April 19, 2012
12:17 p.m.
On 17.04.2012 07:32, John Mitchell wrote:
Hi,
I am using f2py to pass a numpy array of type numpy.int8 to fortran. It seems like I am misunderstanding something because I just can't make it work.
Here is what I am doing.
PYTHON b=numpy.array(numpy.zeros(shape=(10,),dtype=numpy.int8),order='F')
This returns an array with dtype int. You want: b = numpy.zeros(shape=(10,),dtype=numpy.int8,order='F') Sturla