8000 f2py throws AssertionError on fortran 90 files which declare routines with C bindings (Trac #1679) · Issue #2275 · numpy/numpy · GitHub
[go: up one dir, main page]

Skip to content

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

@numpy-gitbot

Description

@numpy-gitbot

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0