You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
f2py - f90-style character array definition with character(len=n) fails #18684
definition it fails (creates single byte string of length m (dim=(), dtype='|Sm')) whereas when I use F77-style length specification
character*n, dimension(m) :: variable
it correctly produces an array dim=(m,), dtype = '|Sn'.
I am hoping that crackfortran could be relatively(?) easily adjusted to add a regexp to also accept the f90-style character length specification? For context (see example below), I use a *.f code file (f77 format) for the code layout, but the same Fortran code should be allowable either way, whether using .f or .f90. (I have not tested whether this already works in an .f90 file.)
Or maybe I am just overlooking something?
Reproducing code example:
To give an real-world example, I have the snippets
as, as it should lines in the output of compilation
analyzevars: charselector={'len': '8'} unhandled.analyzevars: charselector={'len': '8'} unhandled.analyzevars: character array "character*8 idtcsym(30)" is considered as "character idtcsym(30,8)"; "intent(c)" is forced.
Activity
2sn commentedon Jun 3, 2021
I have some f90 codes I wrap with
f2pyand in these usingcharacter(len=n)does not seem to cause issues.TST: added test for issue numpy#18684
TST: added test for issue numpy#18684
ENH: Support character string arrays
ENH: Support character string arrays
ENH: Support character string arrays