Skip to content
Advertisement

Tag: fortran

Is this a correct python port of a fortran function call

I’m trying to port fortran code to python (call me crazy), and am wondering whether I’m handling the input of a variable to a function in a correct way. note that I’ve read: Fortran77: what does the asterisk (*) means in subroutine argument? How can a scalar be passed to a vector (1D array) to a Fortran subroutine? What is

f2py: Python does not import module

I would like to import an Fortran module into python with f2py. I successfully compiled the module with the command f2py -c primes.f90 -m primes. This command generates primes.cp39-win_amd64.pyd and an directory: When I am trying to import the module as described here with import primes it imports something but not the module. So e.g I cannot see the docstring

Advertisement