[Debian-pan-maintainers] Bug#1082288: tomopy: tests fail with scipy 1.14
Drew Parsons
dparsons at debian.org
Thu Sep 19 17:57:01 BST 2024
Source: tomopy
Version: 1.15.0+ds1-4
Severity: normal
tomopy is failing tests with scipy 1.14 from experimental, evidently
due to deprecation of interp2d
https://ci.debian.net/packages/t/tomopy/unstable/amd64/51870629/
200s _________________ StripeRemovalTestCase.test_remove_all_stripe _________________
200s
200s self = <test_tomopy.test_prep.test_stripe.StripeRemovalTestCase testMethod=test_remove_all_stripe>
200s
200s def test_remove_all_stripe(self):
200s mat = np.random.rand(self.size, self.size)
200s lis_off = np.linspace(0, 1, self.size)
200s mat_off = np.tile(lis_off, (self.size, 1))
200s mat[:, self.b:self.e] = 6.0
200s > mat_corr = srm.remove_all_stripe(
200s np.expand_dims(mat, 1), 1.5, 5, 3)[:, 0, :]
200s
200s test/test_tomopy/test_prep/test_stripe.py:135:
200s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
200s /usr/lib/python3/dist-packages/tomopy/prep/stripe.py:877: in remove_all_stripe
200s arr = mproc.distribute_jobs(tomo,
200s /usr/lib/python3/dist-packages/tomopy/util/mproc.py:329: in distribute_jobs
200s _arg_parser(m)
200s /usr/lib/python3/dist-packages/tomopy/util/mproc.py:383: in _arg_parser
200s result = func(*func_args, **kwargs)
200s /usr/lib/python3/dist-packages/tomopy/prep/stripe.py:890: in _remove_all_stripe
200s sino = _rs_dead(sino, snr, la_size, matindex)
200s /usr/lib/python3/dist-packages/tomopy/prep/stripe.py:826: in _rs_dead
200s finter = interpolate.interp2d(listx, listy, matz, kind='linear')
200s _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
200s
200s self = <scipy.interpolate._interpolate.interp2d object at 0x7f8ebc257440>
200s x = array([ 0, 1, 2, 3, 4, 5, 6, 10, 11, 12, 16, 17, 18, 19, 20, 21, 22,
200s 23, 24, 25, 26, 27, 28, 32, 33, 34, 35, 36, 37, 38, 39, 43, 44, 45,
200s 46, 47, 48, 49, 50, 51, 52, 53, 54, 60, 61, 62, 63])
200s y = array([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
200s 17, 18, 19, 20, 21, 22, 23, 24, 25, ...36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50,
200s 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63])
200s z = array([[0.58459985, 0.39958706, 0.79842966, ..., 0.20840328, 0.2114965 ,
200s 0.83641935],
200s [0.61540678, 0.61...08,
200s 0.57549454],
200s [0.05776019, 0.83921768, 0.88255173, ..., 0.14722156, 0.36112475,
200s 0.12312066]])
200s kind = 'linear', copy = True, bounds_error = False, fill_value = None
200s
200s def __init__(self, x, y, z, kind='linear', copy=True, bounds_error=False,
200s fill_value=None):
200s > raise NotImplementedError(err_mesg)
200s E NotImplementedError: `interp2d` has been removed in SciPy 1.14.0.
200s E
200s E For legacy code, nearly bug-for-bug compatible replacements are
200s E `RectBivariateSpline` on regular grids, and `bisplrep`/`bisplev` for
200s E scattered 2D data.
200s E
200s E In new code, for regular grids use `RegularGridInterpolator` instead.
200s E For scattered data, prefer `LinearNDInterpolator` or
200s E `CloughTocher2DInterpolator`.
200s E
200s E For more details see
200s E https://scipy.github.io/devdocs/tutorial/interpolate/interp_transition_guide.html
200s
200s /usr/lib/python3/dist-packages/scipy/interpolate/_interpolate.py:129: NotImplementedError
...
200s FAILED test/test_tomopy/test_prep/test_stripe.py::StripeRemovalTestCase::test_remove_all_stripe
200s FAILED test/test_tomopy/test_prep/test_stripe.py::StripeRemovalTestCase::test_remove_dead_stripe
200s FAILED test/test_tomopy/test_prep/test_stripe.py::StripeRemovalTestCase::test_remove_stripe_based_interpolation
200s ============ 3 failed, 58 passed, 7 skipped, 147 warnings in 20.39s ============
We've only just recently updated to scipy 1.13, but nevertheless we'll
want to update further to scipy 1.14 before long.
More information about the Debian-pan-maintainers
mailing list