Package: src:gammapy
Version: 0.13-1
Severity: important
Tags: sid bullseye
User: debian-pyt...@lists.debian.org
Usertags: python3.8

As discussed by email, gammapy's tests fail with numpy-1.17 and python3.8.

/usr/lib/python3/dist-packages/matplotlib/backends/backend_agg.py:522: 
SystemError
_____________________________ test_energy_logspace _____________________________

i = 2, stacklevel = 3

    def _index_deprecate(i, stacklevel=2):
        try:
>           i = operator.index(i)
E           TypeError: 'numpy.float64' object cannot be interpreted as an 
integer

/usr/lib/python3/dist-packages/numpy/core/function_base.py:22: TypeError

During handling of the above exception, another exception occurred:

    def test_energy_logspace():
        energy = energy_logspace(emin="0.1 TeV", emax="10 TeV", nbins=3)
        assert energy.unit == "TeV"
        assert_allclose(energy.value, [0.1, 1, 10])

        energy = energy_logspace(emin=0.1, emax=10, nbins=3, unit="TeV")
        assert energy.unit == "TeV"
        assert_allclose(energy.value, [0.1, 1, 10])

> energy = energy_logspace(emin="0.1 TeV", emax="10 TeV", nbins=1, per_decade=True)

gammapy/utils/tests/test_energy.py:16:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
gammapy/utils/energy.py:36: in energy_logspace
    energy = np.logspace(x_min, x_max, nbins)
<__array_function__ internals>:5: in logspace
    ???
/usr/lib/python3/dist-packages/numpy/core/function_base.py:277: in logspace
    y = linspace(start, stop, num=num, endpoint=endpoint, axis=axis)
<__array_function__ internals>:5: in linspace
    ???
/usr/lib/python3/dist-packages/numpy/core/function_base.py:128: in linspace
    num = _index_deprecate(num)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

i = 2, stacklevel = 3

    def _index_deprecate(i, stacklevel=2):
        try:
            i = operator.index(i)
        except TypeError:
            msg = ("object of type {} cannot be safely interpreted as "
                   "an integer.".format(type(i)))
            i = int(i)
            stacklevel += 1
>           warnings.warn(msg, DeprecationWarning, stacklevel=stacklevel)
E DeprecationWarning: object of type <class 'numpy.float64'> cannot be safely interpreted as an integer.

/usr/lib/python3/dist-packages/numpy/core/function_base.py:28: 
DeprecationWarning
============= 14 failed, 964 passed, 493 skipped in 86.80 seconds ==============

Reply via email to