X Tutup
Skip to content

BUG: f2py: fix allocatable character arrays in module data#30971

Open
HaoZeke wants to merge 1 commit intonumpy:mainfrom
HaoZeke:fix/f2py-allocatable-char-array
Open

BUG: f2py: fix allocatable character arrays in module data#30971
HaoZeke wants to merge 1 commit intonumpy:mainfrom
HaoZeke:fix/f2py-allocatable-char-array

Conversation

@HaoZeke
Copy link
Member

@HaoZeke HaoZeke commented Mar 8, 2026

Happily I was wrong in #21674 (comment) and this wasn't so bad.

Uses get_descr_from_type_and_elsize for allocatable arrays in fortran_getattr, matching the non-allocatable path. Without this, NPY_STRING arrays get itemsize=0 which triggers ValueError.

Closes #21674

Use get_descr_from_type_and_elsize for allocatable arrays in
fortran_getattr, matching the non-allocatable path. Without this,
NPY_STRING arrays get itemsize=0 which triggers ValueError.

Closes numpy#21674
@HaoZeke HaoZeke force-pushed the fix/f2py-allocatable-char-array branch from ce46ee2 to 34c8871 Compare March 8, 2026 20:17
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.

BUG: Allocation of character arrays in F2PY

1 participant

X Tutup