[SciPy-dev] Should ndimage.measurements.* should return lists if index is a list?

Stéfan van der Walt stefan@sun.ac...
Sun Apr 19 18:40:24 CDT 2009


2009/4/19  <josef.pktd@gmail.com>:
> The long term intention is to rewrite ndimage in cython, but I don't think
> this will happen anytime soon.

I wish it could, though -- it would save us so much time, and I think
it is doable in two months by a dedicated student.  Does anyone have
some free time to spare, or some money to pay for a student?

Ndimage is a tremendously useful package; it just needs a bit of love.

> My opinion is that it is easy to convert labels and index to integers, so if
> ndimage only handles index of type long (and makes a type check) this should
> be enough.

That should be fine.

With Cython, a type conversion is trivial to do  Ndimage was based on
Numeric -- but with NumPy many of its operations can be done using
fancy indexing and broadcasting.  A slight decrease in speed for a
massive improvement in readability.

Regards
Stéfan


More information about the Scipy-dev mailing list