Skip to content

BUG: Fix f2py string variables in callbacks. #10046

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 18, 2017

Conversation

charris
Copy link
Member

@charris charris commented Nov 18, 2017

When NPY_CHAR was deprecated and replaced by NPY_STRING in f2py, calls
to PyArray_New that previously relied on the type to get the itemsize
needed the size explicitly specified, but that modification was missed
in some of the code. Because the strings that replaced the 'c' type are
always 'S1', we use an itemsize of 1 for the string types and pass it
explicitly.

Closes #10027.

When NPY_CHAR was deprecated and replaced by NPY_STRING in f2py, calls
to PyArray_New that previously relied on the type to get the itemsize
needed the size explicitly specified, but that modification was missed
in some of the code. Because the strings that replacee the 'c' type are
always 'S1', we use an itemsize of 1 for the string types and pass it
explicitly.

Closes numpy#10027.
@charris charris added this to the 1.13.4 release milestone Nov 18, 2017
@charris charris force-pushed the fix-f2py-string-callback branch from c73be61 to 8825fac Compare November 18, 2017 02:46
@charris charris merged commit 88ef6c5 into numpy:maintenance/1.13.x Nov 18, 2017
@charris charris deleted the fix-f2py-string-callback branch November 18, 2017 03:35
@charris charris changed the title Fix f2py string callback BUG: Fix f2py string callback Nov 19, 2017
@charris charris changed the title BUG: Fix f2py string callback BUG: Fix f2py string variables in callbacks. Nov 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant