On Fri, 2016-12-23 at 10:43 +0100, Andreas Tille wrote:
> Hi,
> 
> I have cloned bug #848758 where I suggested to revert the python-numpy
> transition which other posters agreed upon.  Besides breaking
> python-skbio I spotted another package python-skimage which fails with:
> 
> 
> ======================================================================
> ERROR: skimage.filters.rank.tests.test_rank.test_all
> ----------------------------------------------------------------------
> Traceback (most recent call last):
>   File "/usr/lib/python2.7/dist-packages/nose/case.py", line 197, in runTest
>     self.test(*self.arg)
>   File 
> "/build/skimage-0.12.3/debian/tmp/usr/lib/python2.7/dist-packages/skimage/filters/rank/tests/test_rank.py",
>  line 16, in test_all
>     check_all()
>   File 
> "/build/skimage-0.12.3/debian/tmp/usr/lib/python2.7/dist-packages/skimage/_shared/testing.py",
>  line 232, in inner
>     result = func(*args, **kwargs)
>   File 
> "/build/skimage-0.12.3/debian/tmp/usr/lib/python2.7/dist-packages/skimage/filters/rank/tests/test_rank.py",
>  line 89, in check_all
>     rank.windowed_histogram(image, selem))
>   File 
> "/build/skimage-0.12.3/debian/tmp/usr/lib/python2.7/dist-packages/skimage/filters/rank/generic.py",
>  line 986, in windowed_histogram
>     pixel_size=n_bins)
>   File 
> "/build/skimage-0.12.3/debian/tmp/usr/lib/python2.7/dist-packages/skimage/filters/rank/generic.py",
>  line 90, in _apply_vector_per_pixel
>     pixel_size=pixel_size)
>   File 
> "/build/skimage-0.12.3/debian/tmp/usr/lib/python2.7/dist-packages/skimage/filters/rank/generic.py",
>  line 53, in _handle_input
>     out = np.empty(image.shape+(pixel_size,), dtype=out_dtype)
> TypeError: 'numpy.float64' object cannot be interpreted as an index
> 
> ----------------------------------------------------------------------
> Ran 1383 tests in 181.697s

Sounds like the kind of bug upstream would be interested in getting
fixed. This implementation must be relying on an implicit integer type
for the overall shape of the filter. My initial guess would be that
pixel_size ends-up being a float rather than an int here?

Not sure whether it is worth reverting numpy for this. From a quick
search, it looks like skimage has had issues like this in the past.

Ghis

Reply via email to