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

NumPy Trac numpy-tickets@scipy....
Sun Mar 13 05:03:31 CDT 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:               |  

Comment(by pearu):

 Unfortunately, I just learned that in C it is impossible to determine how
 many arguments are used for calling a C function using stdarg.h macros.
 So, my original idea of creating a C function
   int size(PyArrayObject* arr, ...)
 does not work.

 However, there is another solution: f2py can map size calls with two
 arguments to the corresponding shape calls. I'll try how it will work

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

More information about the NumPy-Tickets mailing list