-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
f2py - f90-style character array definition with character(len=n) fails #18684
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
Labels
Comments
I have some f90 codes I wrap with |
pearu
added a commit
to pearu/numpy
that referenced
this issue
Jul 2, 2021
pearu
added a commit
to pearu/numpy
that referenced
this issue
Sep 1, 2021
pearu
added a commit
to pearu/numpy
that referenced
this issue
Sep 6, 2021
TST: added test for issue numpy#18684 ENH: f2py opens files with correct encoding, fixes numpy#635 TST: added test for issue numpy#6308 TST: added test for issue numpy#4519 TST: added test for issue numpy#3425 ENH: Implement user-defined hooks support for post-processing f2py data structure. Implement character BC hook. ENH: Add support for detecting utf-16 and utf-32 encodings.
melissawm
pushed a commit
to pearu/numpy
that referenced
this issue
Apr 4, 2022
TST: added test for issue numpy#18684 ENH: f2py opens files with correct encoding, fixes numpy#635 TST: added test for issue numpy#6308 TST: added test for issue numpy#4519 TST: added test for issue numpy#3425 ENH: Implement user-defined hooks support for post-processing f2py data structure. Implement character BC hook. ENH: Add support for detecting utf-16 and utf-32 encodings.
HaoZeke
pushed a commit
to pearu/numpy
that referenced
this issue
Jun 5, 2022
TST: added test for issue numpy#18684 ENH: f2py opens files with correct encoding, fixes numpy#635 TST: added test for issue numpy#6308 TST: added test for issue numpy#4519 TST: added test for issue numpy#3425 ENH: Implement user-defined hooks support for post-processing f2py data structure. Implement character BC hook. ENH: Add support for detecting utf-16 and utf-32 encodings.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
this is for f2py (version 1.20.2)
when use f90-style
definition it fails (creates single byte string of length m (dim=(), dtype='|Sm')) whereas when I use F77-style length specification
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
and then after compilation
whereas
as, as it should lines in the output of compilation
and resulting in
as it should be.
Error message:
N/A
NumPy/Python version information:
The text was updated successfully, but these errors were encountered: