Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test failure on aarch64 in test_contour_level_diag_0 with PlotPy 2.4.0 #17

Closed
ema opened this issue Jul 9, 2024 · 1 comment
Closed
Labels
bug Something isn't working

Comments

@ema
Copy link

ema commented Jul 9, 2024

In Debian we are seeing a test failure with PlotPy 2.4.0 on aarch64: https://bugs.debian.org/1075814

____________________ ContourTest.test_contour_level_diag_0 _____________________

self = <plotpy.tests.unit.test_contour.ContourTest testMethod=test_contour_level_diag_0>

    def test_contour_level_diag_0(self):
        """Test that contour() returns opened lines (diagonal) when level is 0.0"""
        lines = compute_contours(self.Z, 0.0, self.X, self.Y)
>       assert len(lines) == 1
E       assert 4 == 1
E        +  where 4 = len([<plotpy.items.contour.ContourLine object at 0xffffa7c0e4d0>, <plotpy.items.contour.ContourLine object at 0xffffa7c0cb...lotpy.items.contour.ContourLine object at 0xffffa7c0c0d0>, <plotpy.items.contour.ContourLine object at 0xffffa7c0d0d0>])

plotpy/tests/unit/test_contour.py:42: AssertionError

So lines is supposed to have only one element, but on aarch64 it has 4. I have inspected the contents of lines[0] and lines[1] hoping this could help find out what is going on. These are all the contents of lines[0]:

[[ 2.9    -1.9   ]
 [ 2.9125 -1.9125]
 [ 2.925  -1.925 ]
 [ 2.925  -1.925 ]
 [ 2.9375 -1.9375]
 [ 2.95   -1.95  ]
 [ 2.95   -1.95  ]
 [ 2.9625 -1.9625]
 [ 2.975  -1.975 ]
 [ 2.9625 -1.9625]]

And the first few elements of lines[1] look like this:

[[-6.25000000e-02  1.06250000e+00]
 [-5.00000000e-02  1.05000000e+00]
 [-5.00000000e-02  1.05000000e+00]
 [-3.75000000e-02  1.03750000e+00]
 [-2.50000000e-02  1.02500000e+00]
 [-2.50000000e-02  1.02500000e+00]
 [...]

For reference, on a x86_64 system the first few elements of lines[0] are:

[[-9.75000000e-01  1.97500000e+00]
 [-9.62500000e-01  1.96250000e+00]
 [-9.50000000e-01  1.95000000e+00]
 [-9.50000000e-01  1.95000000e+00]
 [-9.37500000e-01  1.93750000e+00]
 [-9.25000000e-01  1.92500000e+00]
 [-9.25000000e-01  1.92500000e+00]
 [...]

The test failure can be reproduced reliably in the build tree as follows:

$ cd .pybuild/cpython3_3.12_plotpy/build
$ python3.12 -m pytest plotpy/tests/unit/test_contour.py
@PierreRaybaut PierreRaybaut added the bug Something isn't working label Jul 12, 2024
@PierreRaybaut
Copy link
Contributor

@ema : FYI, I just released PlotPy v2.4.2 to fix this issue. Thanks again the feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants