[NumPy-Tickets] [NumPy] #1532: f2py does not respect assumed size arrays of fortran 90
NumPy Trac
numpy-tickets@scipy....
Mon Feb 28 15:06:58 CST 2011
#1532: f2py does not respect assumed size arrays of fortran 90
--------------------------+-------------------------------------------------
Reporter: ozn | Owner: pearu
Type: enhancement | Status: reopened
Priority: normal | Milestone: Unscheduled
Component: numpy.f2py | Version: devel
Resolution: | Keywords:
--------------------------+-------------------------------------------------
Comment(by pearu):
Great!
Actually, in a pyf file one can use
{{{
real, intent(out) :: foo_out3(shape(foo_in,1) * 4)
}}}
Here shape(arr, dim) is a CPP macro defined in a f2py wrapper code that is
equivalent to Fortran size(arr, dim). In addition, in a pyf file dimension
spec can be arbitrary C expression.
So, in principle, if one implements a C function size that takes either 1
(numpy ndarray object) or 2 arguments (numpy ndarray object, int) then
f2py could easily use such a function. This feature request should
probably live in another ticket..
--
Ticket URL: <http://projects.scipy.org/numpy/ticket/1532#comment:15>
NumPy <http://projects.scipy.org/numpy>
My example project
More information about the NumPy-Tickets
mailing list