[Debian-astro-maintainers] Bug#1029690: gammapy: tests fail with scipy 1.10
Drew Parsons
dparsons at debian.org
Thu Jan 26 11:42:31 GMT 2023
Package: gammapy
Version: 1.0-2
Severity: normal
scipy 1.10 is now available in experimental.
emperor fails debci tests using it.
We are considering uploading scipy 1.10 to unstable in order to
included it in the forthcoming stable release. If we proceed with
that, then this bug will become Severity: serious.
The errors are ValueError: Big-endian buffer not supported on
little-endian compiler
and TypeError: No matching signature found
A sample from the failing test log is
______________________________ test_psf_map_reco _______________________________
tmpdir = local('/tmp/pytest-of-debci/pytest-0/test_psf_map_reco0')
def test_psf_map_reco(tmpdir):
energy_axis = MapAxis.from_energy_bounds("1 TeV", "10 TeV", nbin=3, name="energy")
geom = RegionGeom.create("icrs;circle(0, 0, 0.1)")
psf_map = RecoPSFMap.from_gauss(
energy_axis=energy_axis, sigma=[0.1, 0.2, 0.3] * u.deg, geom=geom
)
filename = tmpdir / "test_psf_reco.fits"
psf_map.write(filename, format="gadf")
psf_map = RecoPSFMap.read(filename, format="gadf")
assert psf_map.psf_map.unit == "sr-1"
assert "energy" in psf_map.psf_map.geom.axes.names
assert psf_map.energy_name == "energy"
assert psf_map.required_axes == ["rad", "energy"]
value = psf_map.containment(rad=0.1, energy=energy_axis.center)
assert_allclose(value, [0.3938, 0.1175, 0.0540], rtol=1e-2)
value = psf_map.containment_radius(energy=energy_axis.center, fraction=0.394)
assert_allclose(value, [0.1, 0.2, 0.3] * u.deg, rtol=1e-2)
value = psf_map.containment_radius_map(energy=1 * u.TeV, fraction=0.394)
assert_allclose(value.data[0], 0.11875, rtol=1e-2)
kern_geom = WcsGeom.create(binsz=0.02, width=5.0, axes=[energy_axis])
> psfkernel = psf_map.get_psf_kernel(
position=SkyCoord(1, 1, unit="deg"), geom=kern_geom, max_radius=1 * u.deg
)
/usr/lib/python3/dist-packages/gammapy/irf/psf/tests/test_map.py:534:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3/dist-packages/gammapy/irf/psf/map.py:276: in get_psf_kernel
data = self.psf_map.interp_by_coord(
/usr/lib/python3/dist-packages/gammapy/maps/region/ndmap.py:423: in interp_by_coord
return self.interp_by_pix(pix, **kwargs)
/usr/lib/python3/dist-packages/gammapy/maps/region/ndmap.py:442: in interp_by_pix
return fn(tuple(pix), clip=False)
/usr/lib/python3/dist-packages/gammapy/utils/interpolation.py:120: in __call__
values = self._interpolate(points_interp, method, **kwargs)
/usr/lib/python3/dist-packages/scipy/interpolate/_rgi.py:336: in __call__
result = evaluate_linear_2d(self.values,
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ???
E ValueError: Big-endian buffer not supported on little-endian compiler
_rgi_cython.pyx:19: ValueError
------------------------------ Captured log call -------------------------------
WARNING gammapy.irf.core:core.py:686 Position <SkyCoord (ICRS): (ra, dec) in deg
(1., 1.)> is outside valid IRF map range, using nearest IRF defined within
_____________________________ test_interp_methods ______________________________
def test_interp_methods():
m = Map.create(npix=(3, 3))
m.data += np.arange(9).reshape((3, 3))
> actual = m.interp_by_coord({"lon": 0.07, "lat": 0.03}, method="linear")
/usr/lib/python3/dist-packages/gammapy/maps/wcs/tests/test_ndmap.py:327:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3/dist-packages/gammapy/maps/wcs/ndmap.py:133: in interp_by_coord
return self.interp_by_pix(pix, method=method, fill_value=fill_value)
/usr/lib/python3/dist-packages/gammapy/maps/wcs/ndmap.py:152: in interp_by_pix
interp_data = fn(tuple(pix), clip=False)
/usr/lib/python3/dist-packages/gammapy/utils/interpolation.py:120: in __call__
values = self._interpolate(points_interp, method, **kwargs)
/usr/lib/python3/dist-packages/scipy/interpolate/_rgi.py:336: in __call__
result = evaluate_linear_2d(self.values,
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
> ???
E TypeError: No matching signature found
_rgi_cython.pyx:19: TypeError
More information about the Debian-astro-maintainers
mailing list