[Numpy-discussion] f2py function name issues
Fri Mar 9 14:42:05 CST 2012
Thank you very much for the clarification. It would be nice if this
were mentioned in the documentation.
On 10 March 2012 01:59, Pauli Virtanen <email@example.com> wrote:
> 09.03.2012 21:05, Sameer Grover kirjoitti:
>> subroutine union ()
>> write(*,*)'Hello from Fortran90!!!'
>> end subroutine union
>> f2py is unable to wrap this function. Changing the name of the
>> subroutine from 'union' to something else works. I understand that
>> problems like these have been reported a long time ago
>> with some other function names as well.
>> This looks like a bug to me or is there something I'm missing?
> f2py indeed seems to skip names that collide with C keywords. The reason
> probably is that it's not guaranteed that the symbol name is mangled to
> "union_" but it could also become "union". If the name matches a C
> keyword, there's probably no (sane) way to call the function from the C
> language, and since f2py goes through C, it's not able to call that.
> Whether this is a real problem in practice or not is then a different
> The full list of "bad" names is
> 'max', 'min', 'flen','fshape',
> NumPy-Discussion mailing list
More information about the NumPy-Discussion