[NumPy-Tickets] [NumPy] #1765: f2py support for size(array, dim) syntax

NumPy Trac numpy-tickets@scipy....
Thu Mar 10 11:26:31 CST 2011

#1765: f2py support for size(array, dim) syntax
 Reporter:  lorenz       |       Owner:  pearu      
     Type:  enhancement  |      Status:  new        
 Priority:  normal       |   Milestone:  Unscheduled
Component:  numpy.f2py   |     Version:  1.5.1      
 Keywords:               |  
 In the discussion on issue #1532 it was suggested to open another issue
 requesting support for the 2 argument size() syntax, as in

 subroutine foo(a, n, m, b)
   implicit none

   real, intent(in) :: a(n, m)
   integer, intent(in) :: n, m
   real, intent(out) :: b(size(a, 1))

   integer :: i

   do i = 1, size(b)
     b(i) = sum(a(i,:))
 end subroutine

 Of course, in this trivial example there is no real point in using
 {{{size(a,1)}}} instead of {{{n}}} directly - however, when issue #1532 is
 done (assumed shape support), this could be very useful!

 Kind regards,

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

More information about the NumPy-Tickets mailing list