Thanks Travis,
I guess we'll have to tweak the fortran subroutines. It would have been neat
though.
David
Answer: Since g+=1 adds one to all N elements of g, the buffer a gets
incremented N times.
So
a = array(i)
g = ndarray(shape=(1,N), dtype=int, buffer=a, strides=(0,0))
g+=M
returns i + M*N
David Huard wrote:
> Hi,
>
> I have fortran subroutines wrapped with f2py that take arrays as
> arguments, and I often need to use resize(a, N) to pass an array of
> copies of an element. The resize call , however, is becoming the speed
> bottleneck, so my question is:
> Is it possible to creat
Hi,
I have fortran subroutines wrapped with f2py that take arrays as arguments,
and I often need to use resize(a, N) to pass an array of copies of an
element. The resize call , however, is becoming the speed bottleneck, so my
question is:
Is it possible to create an (1xN) array from a scalar with