[Scipy-tickets] [SciPy] #1608: ndimage.center_of_mass is VERY slow (not using C extension)

SciPy Trac scipy-tickets@scipy....
Fri Feb 24 13:24:51 CST 2012

#1608: ndimage.center_of_mass is VERY slow (not using C extension)
 Reporter:  chenxing       |       Owner:  somebody   
     Type:  defect         |      Status:  new        
 Priority:  normal         |   Milestone:  Unscheduled
Component:  scipy.ndimage  |     Version:  0.10.0     
 Keywords:                 |  
 ndimage.center_of_mass turns out to be very slow. On looking at the
 sources, it turns out that the C extension is not used, although the
 following function exists in ni_measure.c:

 int NI_CenterOfMass(PyArrayObject*, PyArrayObject*, npy_intp, npy_intp,
                     npy_intp*, npy_intp, double*);

 Is it because the function is not ready yet?

 If we are allowed to use some C++ features, such as STL map, the
 implementation will be easy. Are we allowed to do so?

Ticket URL: <http://projects.scipy.org/scipy/ticket/1608>
SciPy <http://www.scipy.org>
SciPy is open-source software for mathematics, science, and engineering.

More information about the Scipy-tickets mailing list