GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — f2py throws AssertionError on fortran 90 files which declare routines with C bindings (Trac #1679) · Issue #2275 · numpy/numpy

f2py throws AssertionError on fortran 90 files which declare routines with C bindings (Trac #1679) #2275

New issue
Copy link
New issue
Copy link
Closed
#24555
Closed
f2py throws AssertionError on fortran 90 files which declare routines with C bindings (Trac #1679)#2275
#24555
Copy link
Labels
00 - Bugcomponent: numpy.f2py
Milestone
1.6.0

Description

@numpy-gitbot
numpy-gitbot
opened on Oct 19, 2012
Issue body actions

Original ticket http://projects.scipy.org/numpy/ticket/1679 on 2010-11-19 by trac user davidpowell, assigned to @pearu.

When running f2py on a fortran 90 file with the following contents:

interface
    function my_func(x) bind(c,name='my_func')
        use iso_c_binding
        real(c_double), intent(in) :: x
        real(c_double) :: my_func
    end function
end interface

It causes an exception in f2py, ending with the following line:

  File "C:\Python26\lib\site-packages\numpy\f2py\crackfortran.py", line 665, in markoutercomma
    assert not f,`f,line,l,cc`
AssertionError: (1, "x@)@ bind@(@c,name='my_func'", "x@)@ bind@(@c,name='my_func'", ')')

As far as I understand this is just a bug in the parser, since f2py shouldn't care that my fortran code is internally calling C routines.

Activity

  1. numpy-gitbot commented on Oct 19, 2012

    @numpy-gitbot
    numpy-gitbot
    on Oct 19, 2012
    Author
    More actions

    @pearu wrote on 2010-12-02

    Fixed in numpy git repo.

  2. numpy-gitbot commented on Oct 19, 2012

    @numpy-gitbot
    numpy-gitbot
    on Oct 19, 2012
    Author
    More actions

    Milestone changed to 1.6.0 by @mwiebe on 2011-05-31

  3. numpy-gitbot
    closed this as completedon Oct 19, 2012
  4. dhermes commented on Sep 14, 2017

    @dhermes
    dhermes
    on Sep 14, 2017
    Contributor
    More actions

    It seems this issue has had a regression: https://gist.github.com/dhermes/b27be5cc4c73d9665beff24b6c18af4f

    Observed with numpy==1.13.1 in Python 3.6.

  5. charris commented on Sep 15, 2017

    @charris
    charris
    on Sep 15, 2017
    Member
    More actions

    @dhermes AFAICT from checking back to NumPy 1.6, your example has never worked. I note that it isn't quite the same as the example in this issue.

  6. charris commented on Sep 15, 2017

    @charris
    charris
    on Sep 15, 2017
    Member
    More actions

    @dhermes You should open a new issue for your problem.

  7. dhermes commented on Sep 15, 2017

    @dhermes
    dhermes
    on Sep 15, 2017
    Contributor
    More actions

    Done (#9693). Thanks for the reply @charris!

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    00 - Bugcomponent: numpy.f2py

    Type

    No type

    Projects

    No projects

      Milestone

      • 1.6.0

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.