[NumPy-Tickets] [NumPy] #2054: f2py's handling of strided arrays.

NumPy Trac numpy-tickets@scipy....
Tue Feb 14 08:33:06 CST 2012


#2054: f2py's handling of strided arrays.
-------------------------+--------------------------------------------------
 Reporter:  pch          |       Owner:  pearu      
     Type:  enhancement  |      Status:  new        
 Priority:  normal       |   Milestone:  Unscheduled
Component:  numpy.f2py   |     Version:  1.6.1      
 Keywords:               |  
-------------------------+--------------------------------------------------
 There was some discussion some time ago on numpy's mailing list to include
 strided array handling in f2py. I badly need this feature, so here I file
 the request for enhancement.

 Given a Fortran routine,
 {{{
 subroutine multiply_me(a)
     integer*8, intent(inout) :: a(:,:)
     a = a * 2
 end subroutine multiply_me
 }}}

 The following Python code should give:
 {{{
 > a = np.ones((2,4), np.int64)
 > multiply_me(a[::2,::2])
 > print a
 [[2,1,2,1]
  [1,1,1,1]]
 }}}

-- 
Ticket URL: <http://projects.scipy.org/numpy/ticket/2054>
NumPy <http://projects.scipy.org/numpy>
My example project


More information about the NumPy-Tickets mailing list