[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Python-numpy transition breaks at least two packages



Hi Ghislain,

On Fri, Dec 23, 2016 at 10:02:33AM +0000, Ghislain Vaillant wrote:
> 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?

Yes, sure.  Any volunteer to submit the issue upstream?  Sorry, I will
not manage it in a sensible time frame.
 
> 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.

I'm also not sure and people who know better than me should feel free to
close bug #849177.  I'd be really happy if there are better solutions to
fix python-skimage in the next 36 hours.  My reading of the arguments in
#849177 is that there are other reasons to revert the upgrade even
without the additional problem - thus I was opening the bug report
independently from other packages like python-skimage and python-skbio.

Kind regards

      Andreas.
-- 
http://fam-tille.de


Reply to: