Skip to content

DOC: I'm unable to replicate the examples around f2py #23592

@nbehrnd

Description

@nbehrnd

Issue with current documentation:

Web address in question: https://numpy.org/doc/stable/f2py/f2py.getting-started.html#the-smart-way
Test system is an instance of Linux Debian 12/bookworm with both gcc and gfortran (version 12.2.0-14), Python3 (version 3.11.4) and numpy (version 1.24.2) -- all installed from the repositories of Linux Debian 12/bookworm, branch testing.

An ongoing thread fortran-lang.discourse.group lead me to the documentation of numpy, now the numpy mailing list to this board.

My suggestions for improvement are these two:

  • The examples of Fortran numpy's reference about f2py shows are written in the old FORTAN77 fixed format style. My recommendation is to rewrite them using contemporary Fortran (free format) in mind, for example in standard of Fortran 2018. This update would affect the examples for section the quick way, the in section the smart way, and the one about the smart and quick way.
  • By yesterday I wasn't able to obtain the wanted functionality. Instead, the log captured from the terminal (included in the .zip archive attached) reports errors. Perhaps the documentation is incomplete, and does not state all dependencies to fulfill. Perhaps the documentation once lead to a functional result, but with continuous development of Python, numpy, and Fortran one or multiple interfaces relevant here do not work the same way as they once did. In a subsequent report to fortran-lang, a fellow reader equally noticed difficulties to replicate your instructions. Can you please check - and if necessary, update - the documentation accordingly?

The zip archive example.zip includes both the three files used, as well as the input/output from/to the CLI in the attempt by yesterday 2023-04-13 Thu.

example.zip

Idea or request for content:

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions