Skip to content

BUG: f2py incorrectly translates "n/2*2" dimension => closed bug #8062 persists #20177

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

Closed
dibnob44 opened this issue Oct 23, 2021 · 1 comment

Comments

@dibnob44
Copy link

Describe the issue:

The original example in #8062 still fails to compile at newest numpy.f2py, either in python3 or from command line,
despite bug #8062 closed recently:

/tmp/tmprwxhrqbm/src.linux-x86_64-3.8/hello-f2pywrappers.f:8:16:

8 |       integer a(1.0 * n + 1.0)
  |                1

Error: Expression at (1) must be of INTEGER type, found REAL

Reproduce the code example:

See the original example in #8062

Error message:

8 |       integer a(1.0 * n + 1.0)
      |                1
Error: Expression at (1) must be of INTEGER type, found REAL

NumPy/Python version information:

python3-numpy is already the newest version (1:1.17.4-5ubuntu3).

@melissawm
Copy link
Member

Hi @dibnob44 - 1.17.4 is a few releases ago. This is fixed on main, but indeed it's still failing for 1.21.3 with


    5 |       subroutine f2pywrap_testa_testb (testbf2pywrap, a, n)
      |                                     1
......
   15 |       subroutine f2pywrap_testa_testb (testbf2pywrap, testb, a, n)
      |                                     2
Warning: Rank mismatch in argument 'testb' (0/1) between (1) and (2)

If you can't use main for now, you might want to keep an eye out for the next release. If Ubuntu does not provide you with this new version you can use pip, conda or your preferred python environment/package manager to install a newer version.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants