[NumPy-Tickets] [NumPy] #1532: f2py does not respect assumed size arrays of fortran 90

NumPy Trac numpy-tickets@scipy....
Fri Feb 25 04:04:14 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:             
--------------------------+-------------------------------------------------
Changes (by pearu):

  * version:  1.3.0 => devel


Comment:

 Thanks for making the example to work!
 However, this was just one of the problems with the issue of wrapping
 subroutines with assumed-shape arrays. The need to define explicit
 interface for the wrapper function is crucial bit of information. The next
 step would be to decide who or what should define the explicit interface.
 Clearly it cannot be automatic, otherwise f2py could take care of that.
 So, I am thinking that the user could give a hint to f2py. For example, in
 Fortran code one could specify the dimension:

   ..
   real x(:)
 !f2py dimension(n) :: x

 and when f2py discovers that x dimension is specified both as `:` and `n`,
 then it will
 generate a wrapper function with the corresponding interface.

 I'll try if this approach will work .. I guess this feature can end up to
 2.x version of numpy.

-- 
Ticket URL: <http://projects.scipy.org/numpy/ticket/1532#comment:3>
NumPy <http://projects.scipy.org/numpy>
My example project


More information about the NumPy-Tickets mailing list