Bug#1000777: numpy breaks python-xarray autopkgtest on i386: numerical deltas
Paul Gevers
elbrus at debian.org
Sun Nov 28 20:14:35 GMT 2021
Source: numpy, python-xarray
Control: found -1 numpy/1:1.21.4-2
Control: found -1 python-xarray/0.19.0-6
Severity: serious
Tags: sid bookworm
X-Debbugs-CC: debian-ci at lists.debian.org
User: debian-ci at lists.debian.org
Usertags: breaks needs-update
Dear maintainer(s),
With a recent upload of numpy the autopkgtest of python-xarray fails in
testing when that autopkgtest is run with the binary packages of numpy
from unstable on i386. It passes when run with only packages from
testing. In tabular form:
pass fail
numpy from testing 1:1.21.4-2
python-xarray from testing 0.19.0-6
versioned deps [0] from testing from unstable
all others from testing from testing
I copied some of the output at the bottom of this report.
Currently this regression is blocking the migration of numpy to testing
[1]. Due to the nature of this issue, I filed this bug report against
both packages. Can you please investigate the situation and reassign the
bug to the right package?
More information about this bug and the reason for filing it can be found on
https://wiki.debian.org/ContinuousIntegration/RegressionEmailInformation
Paul
[0] You can see what packages were added from the second line of the log
file quoted below. The migration software adds source package from
unstable to the list if they are needed to install packages from
numpy/1:1.21.4-2. I.e. due to versioned dependencies or breaks/conflicts.
[1] https://qa.debian.org/excuses.php?package=numpy
https://ci.debian.net/data/autopkgtest/testing/i386/p/python-xarray/17095751/log.gz
=================================== FAILURES
===================================
___________________ test_interpolate_chunk_advanced[linear]
____________________
method = 'linear'
@requires_scipy
@requires_dask
@pytest.mark.parametrize("method", ["linear", "nearest"])
@pytest.mark.filterwarnings("ignore:Increasing number of chunks")
def test_interpolate_chunk_advanced(method):
"""Interpolate nd array with an nd indexer sharing coordinates."""
# Create original array
x = np.linspace(-1, 1, 5)
y = np.linspace(-1, 1, 7)
z = np.linspace(-1, 1, 11)
t = np.linspace(0, 1, 13)
q = np.linspace(0, 1, 17)
da = xr.DataArray(
data=np.sin(x[:, np.newaxis, np.newaxis, np.newaxis,
np.newaxis])
* np.cos(y[:, np.newaxis, np.newaxis, np.newaxis])
* np.exp(z[:, np.newaxis, np.newaxis])
* t[:, np.newaxis]
+ q,
dims=("x", "y", "z", "t", "q"),
coords={"x": x, "y": y, "z": z, "t": t, "q": q, "label":
"dummy_attr"},
)
# Create indexer into `da` with shared coordinate
("full-twist" Möbius strip)
theta = np.linspace(0, 2 * np.pi, 5)
w = np.linspace(-0.25, 0.25, 7)
r = xr.DataArray(
data=1 + w[:, np.newaxis] * np.cos(theta),
coords=[("w", w), ("theta", theta)],
)
x = r * np.cos(theta)
y = r * np.sin(theta)
z = xr.DataArray(
data=w[:, np.newaxis] * np.sin(theta),
coords=[("w", w), ("theta", theta)],
)
kwargs = {"fill_value": None}
expected = da.interp(t=0.5, x=x, y=y, z=z, kwargs=kwargs,
method=method)
da = da.chunk(2)
x = x.chunk(1)
z = z.chunk(3)
actual = da.interp(t=0.5, x=x, y=y, z=z, kwargs=kwargs,
method=method)
> assert_identical(actual, expected)
E AssertionError: Left and right DataArray objects are not identical
E E Differing values:
E L
E array([[[ 3.302241e-01, 3.927241e-01, ..., 1.267724e+00,
1.330224e+00],
E [ 1.239764e-17, 6.250000e-02, ..., 9.375000e-01,
1.000000e+00],
E ...,
E [-5.560517e-17, 6.250000e-02, ..., 9.375000e-01,
1.000000e+00],
E [ 3.302241e-01, 3.927241e-01, ..., 1.267724e+00,
1.330224e+00]],
E E [[ 3.603946e-01, 4.228946e-01, ...,
1.297895e+00, 1.360395e+00],
E [ 1.346533e-17, 6.250000e-02, ..., 9.375000e-01,
1.000000e+00],
E ...,
E [-5.109700e-17, 6.250000e-02, ..., 9.375000e-01,
1.000000e+00],
E [ 3.603946e-01, 4.228946e-01, ..., 1.297895e+00,
1.360395e+00]],
E E ...,
E E [[ 4.810764e-01, 5.435764e-01, ...,
1.418576e+00, 1.481076e+00],
E [ 1.878775e-17, 6.250000e-02, ..., 9.375000e-01,
1.000000e+00],
E ...,
E [-3.662163e-17, 6.250000e-02, ..., 9.375000e-01,
1.000000e+00],
E [ 4.810764e-01, 5.435764e-01, ..., 1.418576e+00,
1.481076e+00]],
E E [[ 5.112469e-01, 5.737469e-01, ...,
1.448747e+00, 1.511247e+00],
E [ 2.044535e-17, 6.250000e-02, ..., 9.375000e-01,
1.000000e+00],
E ...,
E [-3.371783e-17, 6.250000e-02, ..., 9.375000e-01,
1.000000e+00],
E [ 5.112469e-01, 5.737469e-01, ..., 1.448747e+00,
1.511247e+00]]])
E R
E array([[[ 3.302241e-01, 3.927241e-01, ..., 1.267724e+00,
1.330224e+00],
E [ 1.239764e-17, 6.250000e-02, ..., 9.375000e-01,
1.000000e+00],
E ...,
E [-5.560517e-17, 6.250000e-02, ..., 9.375000e-01,
1.000000e+00],
E [ 3.302241e-01, 3.927241e-01, ..., 1.267724e+00,
1.330224e+00]],
E E [[ 3.603946e-01, 4.228946e-01, ...,
1.297895e+00, 1.360395e+00],
E [ 1.346533e-17, 6.250000e-02, ..., 9.375000e-01,
1.000000e+00],
E ...,
E [-5.109700e-17, 6.250000e-02, ..., 9.375000e-01,
1.000000e+00],
E [ 3.603946e-01, 4.228946e-01, ..., 1.297895e+00,
1.360395e+00]],
E E ...,
E E [[ 4.810764e-01, 5.435764e-01, ...,
1.418576e+00, 1.481076e+00],
E [ 1.878775e-17, 6.250000e-02, ..., 9.375000e-01,
1.000000e+00],
E ...,
E [-3.662163e-17, 6.250000e-02, ..., 9.375000e-01,
1.000000e+00],
E [ 4.810764e-01, 5.435764e-01, ..., 1.418576e+00,
1.481076e+00]],
E E [[ 5.112469e-01, 5.737469e-01, ...,
1.448747e+00, 1.511247e+00],
E [ 2.044535e-17, 6.250000e-02, ..., 9.375000e-01,
1.000000e+00],
E ...,
E [-3.371783e-17, 6.250000e-02, ..., 9.375000e-01,
1.000000e+00],
E [ 5.112469e-01, 5.737469e-01, ..., 1.448747e+00,
1.511247e+00]]])
/usr/lib/python3/dist-packages/xarray/tests/test_interp.py:874:
AssertionError
_____________________ TestVariable.test_broadcasting_math
______________________
self = <xarray.tests.test_variable.TestVariable object at 0xe234be20>
def test_broadcasting_math(self):
x = np.random.randn(2, 3)
v = Variable(["a", "b"], x)
# 1d to 2d broadcasting
assert_identical(v * v, Variable(["a", "b"],
np.einsum("ab,ab->ab", x, x)))
assert_identical(v * v[0], Variable(["a", "b"],
np.einsum("ab,b->ab", x, x[0])))
assert_identical(v[0] * v, Variable(["b", "a"],
np.einsum("b,ab->ba", x[0], x)))
assert_identical(
v[0] * v[:, 0], Variable(["b", "a"], np.einsum("b,a->ba",
x[0], x[:, 0]))
)
# higher dim broadcasting
y = np.random.randn(3, 4, 5)
w = Variable(["b", "c", "d"], y)
assert_identical(
v * w, Variable(["a", "b", "c", "d"],
np.einsum("ab,bcd->abcd", x, y))
)
> assert_identical(
w * v, Variable(["b", "c", "d", "a"],
np.einsum("bcd,ab->bcda", y, x))
)
E AssertionError: Left and right Variable objects are not identical
E E Differing values:
E L
E array([[[[ 2.599162e+00, 4.203630e-01],
E [-1.535482e-01, -2.483337e-02],
E [-7.007329e-01, -1.133297e-01],
E [-1.407709e+00, -2.276690e-01],
E [ 1.824711e-01, 2.951107e-02]],
E E [[ 2.608622e+00, 4.218929e-01],
E [ 2.547940e+00, 4.120787e-01],
E [-7.653887e-01, -1.237864e-01],
E [-6.070710e-01, -9.818170e-02],
E [-2.362519e+00, -3.820905e-01]],
E E [[ 1.020907e-01, 1.651115e-02],
E [ 2.661684e+00, 4.304746e-01],
E [ 1.208155e-02, 1.953951e-03],
E [-1.328791e+00, -2.149056e-01],
E [-1.154634e+00, -1.867391e-01]],
E E [[ 1.191513e+00, 1.927036e-01],
E [-6.021055e-01, -9.737862e-02],
E [ 2.746716e+00, 4.442268e-01],
E [-2.387384e+00, -3.861119e-01],
E [-2.078187e+00, -3.361055e-01]]],
E E E [[[ 5.300545e-01, -2.128138e-02],
E [-2.946731e-01, 1.183095e-02],
E [ 3.155062e-01, -1.266739e-02],
E [ 3.608821e-01, -1.448921e-02],
E [ 8.299963e-01, -3.332387e-02]],
E E [[ 4.979020e-02, -1.999048e-03],
E [-6.336254e-01, 2.543969e-02],
E [-3.603347e-01, 1.446723e-02],
E [-1.130619e+00, 4.539369e-02],
E [ 7.058588e-01, -2.833983e-02]],
E E [[-9.765136e-01, 3.920646e-02],
E [-7.034547e-01, 2.824330e-02],
E [-8.960225e-01, 3.597479e-02],
E [ 2.066461e-01, -8.296722e-03],
E [-3.142470e-01, 1.261684e-02]],
E E [[-5.447846e-01, 2.187279e-02],
E [-1.475410e+00, 5.923686e-02],
E [ 5.763690e-01, -2.314088e-02],
E [-1.794467e+00, 7.204682e-02],
E [-6.822498e-01, 2.739194e-02]]],
E E E [[[ 3.483035e-02, 5.116863e-02],
E [ 1.578827e-01, 2.319426e-01],
E [-2.378342e-01, -3.493979e-01],
E [ 3.567859e-01, 5.241477e-01],
E [ 1.027949e-01, 1.510142e-01]],
E E [[ 8.731014e-02, 1.282657e-01],
E [ 1.240318e-01, 1.822129e-01],
E [-3.130521e-01, -4.598992e-01],
E [-2.779140e-01, -4.082784e-01],
E [ 3.416170e-01, 5.018633e-01]],
E E [[ 1.688552e-01, 2.480621e-01],
E [ 1.079842e-01, 1.586376e-01],
E [ 3.249067e-01, 4.773145e-01],
E [ 7.240457e-01, 1.063682e+00],
E [-3.346429e-02, -4.916178e-02]],
E E [[ 3.792953e-01, 5.572158e-01],
E [-5.941004e-02, -8.727821e-02],
E [ 2.575056e-01, 3.782968e-01],
E [-4.886430e-01, -7.178566e-01],
E [-3.724292e-01, -5.471290e-01]]]])
E R
E array([[[[ 2.599162e+00, 4.203630e-01],
E [-1.535482e-01, -2.483337e-02],
E [-7.007329e-01, -1.133297e-01],
E [-1.407709e+00, -2.276690e-01],
E [ 1.824711e-01, 2.951107e-02]],
E E [[ 2.608622e+00, 4.218929e-01],
E [ 2.547940e+00, 4.120787e-01],
E [-7.653887e-01, -1.237864e-01],
E [-6.070710e-01, -9.818170e-02],
E [-2.362519e+00, -3.820905e-01]],
E E [[ 1.020907e-01, 1.651115e-02],
E [ 2.661684e+00, 4.304746e-01],
E [ 1.208155e-02, 1.953951e-03],
E [-1.328791e+00, -2.149056e-01],
E [-1.154634e+00, -1.867391e-01]],
E E [[ 1.191513e+00, 1.927036e-01],
E [-6.021055e-01, -9.737862e-02],
E [ 2.746716e+00, 4.442268e-01],
E [-2.387384e+00, -3.861119e-01],
E [-2.078187e+00, -3.361055e-01]]],
E E E [[[ 5.300545e-01, -2.128138e-02],
E [-2.946731e-01, 1.183095e-02],
E [ 3.155062e-01, -1.266739e-02],
E [ 3.608821e-01, -1.448921e-02],
E [ 8.299963e-01, -3.332387e-02]],
E E [[ 4.979020e-02, -1.999048e-03],
E [-6.336254e-01, 2.543969e-02],
E [-3.603347e-01, 1.446723e-02],
E [-1.130619e+00, 4.539369e-02],
E [ 7.058588e-01, -2.833983e-02]],
E E [[-9.765136e-01, 3.920646e-02],
E [-7.034547e-01, 2.824330e-02],
E [-8.960225e-01, 3.597479e-02],
E [ 2.066461e-01, -8.296722e-03],
E [-3.142470e-01, 1.261684e-02]],
E E [[-5.447846e-01, 2.187279e-02],
E [-1.475410e+00, 5.923686e-02],
E [ 5.763690e-01, -2.314088e-02],
E [-1.794467e+00, 7.204682e-02],
E [-6.822498e-01, 2.739194e-02]]],
E E E [[[ 3.483035e-02, 5.116863e-02],
E [ 1.578827e-01, 2.319426e-01],
E [-2.378342e-01, -3.493979e-01],
E [ 3.567859e-01, 5.241477e-01],
E [ 1.027949e-01, 1.510142e-01]],
E E [[ 8.731014e-02, 1.282657e-01],
E [ 1.240318e-01, 1.822129e-01],
E [-3.130521e-01, -4.598992e-01],
E [-2.779140e-01, -4.082784e-01],
E [ 3.416170e-01, 5.018633e-01]],
E E [[ 1.688552e-01, 2.480621e-01],
E [ 1.079842e-01, 1.586376e-01],
E [ 3.249067e-01, 4.773145e-01],
E [ 7.240457e-01, 1.063682e+00],
E [-3.346429e-02, -4.916178e-02]],
E E [[ 3.792953e-01, 5.572158e-01],
E [-5.941004e-02, -8.727821e-02],
E [ 2.575056e-01, 3.782968e-01],
E [-4.886430e-01, -7.178566e-01],
E [-3.724292e-01, -5.471290e-01]]]])
/usr/lib/python3/dist-packages/xarray/tests/test_variable.py:1630:
AssertionError
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 495 bytes
Desc: OpenPGP digital signature
URL: <http://alioth-lists.debian.net/pipermail/debian-science-maintainers/attachments/20211128/d04dffbc/attachment.sig>
More information about the debian-science-maintainers
mailing list