Bug#983758: python-xarray: autopkgtest regression on several architectures

Adrian Bunk bunk at debian.org
Mon Mar 1 12:06:55 GMT 2021


Source: python-xarray
Version: 0.17.0-1
Severity: serious

https://ci.debian.net/data/autopkgtest/testing/arm64/p/python-xarray/10765498/log.gz
https://ci.debian.net/data/autopkgtest/testing/arm64/p/python-xarray/10765498/log.gz

...
=================================== FAILURES ===================================
_______________________ TestDataArray.test_pad_constant ________________________

self = <xarray.tests.test_dataarray.TestDataArray object at 0xeeed3e98>

    def test_pad_constant(self):
        ar = DataArray(np.arange(3 * 4 * 5).reshape(3, 4, 5))
        actual = ar.pad(dim_0=(1, 3))
        expected = DataArray(
            np.pad(
                np.arange(3 * 4 * 5).reshape(3, 4, 5).astype(np.float32),
                mode="constant",
                pad_width=((1, 3), (0, 0), (0, 0)),
                constant_values=np.nan,
            )
        )
        assert actual.shape == (7, 4, 5)
        assert_identical(actual, expected)
    
        ar = xr.DataArray([9], dims="x")
    
        actual = ar.pad(x=1)
        expected = xr.DataArray([np.NaN, 9, np.NaN], dims="x")
        assert_identical(actual, expected)
    
        actual = ar.pad(x=1, constant_values=1.23456)
        expected = xr.DataArray([1, 9, 1], dims="x")
        assert_identical(actual, expected)
    
        if LooseVersion(np.__version__) >= "1.20":
            with pytest.raises(ValueError, match="cannot convert float NaN to integer"):
                ar.pad(x=1, constant_values=np.NaN)
        else:
            actual = ar.pad(x=1, constant_values=np.NaN)
            expected = xr.DataArray(
                [-9223372036854775808, 9, -9223372036854775808], dims="x"
            )
>           assert_identical(actual, expected)
E           AssertionError: Left and right DataArray objects are not identical
E           
E           Differing values:
E           L
E               array([0, 9, 0])
E           R
E               array([-9223372036854775808,                    9, -9223372036854775808],
E                     dtype=int64)

/usr/lib/python3/dist-packages/xarray/tests/test_dataarray.py:4523: AssertionError
=============================== warnings summary ===============================
...


https://ci.debian.net/data/autopkgtest/testing/i386/p/python-xarray/10765494/log.gz

...
=================================== FAILURES ===================================
_______________________ TestDataArray.test_pad_constant ________________________

self = <xarray.tests.test_dataarray.TestDataArray object at 0xedd27b20>

    def test_pad_constant(self):
        ar = DataArray(np.arange(3 * 4 * 5).reshape(3, 4, 5))
        actual = ar.pad(dim_0=(1, 3))
        expected = DataArray(
            np.pad(
                np.arange(3 * 4 * 5).reshape(3, 4, 5).astype(np.float32),
                mode="constant",
                pad_width=((1, 3), (0, 0), (0, 0)),
                constant_values=np.nan,
            )
        )
        assert actual.shape == (7, 4, 5)
        assert_identical(actual, expected)
    
        ar = xr.DataArray([9], dims="x")
    
        actual = ar.pad(x=1)
        expected = xr.DataArray([np.NaN, 9, np.NaN], dims="x")
        assert_identical(actual, expected)
    
        actual = ar.pad(x=1, constant_values=1.23456)
        expected = xr.DataArray([1, 9, 1], dims="x")
        assert_identical(actual, expected)
    
        if LooseVersion(np.__version__) >= "1.20":
            with pytest.raises(ValueError, match="cannot convert float NaN to integer"):
                ar.pad(x=1, constant_values=np.NaN)
        else:
            actual = ar.pad(x=1, constant_values=np.NaN)
            expected = xr.DataArray(
                [-9223372036854775808, 9, -9223372036854775808], dims="x"
            )
>           assert_identical(actual, expected)
E           AssertionError: Left and right DataArray objects are not identical
E           
E           Differing values:
E           L
E               array([-2147483648,           9, -2147483648])
E           R
E               array([-9223372036854775808,                    9, -9223372036854775808],
E                     dtype=int64)

/usr/lib/python3/dist-packages/xarray/tests/test_dataarray.py:4523: AssertionError
=============================== warnings summary ===============================
...



More information about the debian-science-maintainers mailing list