question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TST: TestQuantityReshapeFuncs.test_flat_attributes failed with AssertionError on s390x (big-endian)

See original GitHub issue

Example log: https://github.com/astropy/astropy/runs/2708622607?check_suite_focus=true

Last week’s run was successful (https://github.com/astropy/astropy/runs/2653579480?check_suite_focus=true) on 2021-05-24.

________________ TestQuantityReshapeFuncs.test_flat_attributes _________________

self = <astropy.units.tests.test_quantity_array_methods.TestQuantityReshapeFuncs object at 0x42b00b16a0>

    def test_flat_attributes(self):
        """While ``flat`` doesn't make a copy, it changes the shape."""
        q = np.arange(6.).reshape(3, 1, 2) * u.m
        qf = q.flat
        # see TestQuantityArrayCopy.test_flat for tests of iteration
        # and slicing and setting. Here we test the properties and methods to
        # match `numpy.ndarray.flatiter`
        assert qf.base is q
        # testing the indices -- flat and full -- into the array
        assert qf.coords == (0, 0, 0)  # to start
        assert qf.index == 0
        # now consume the iterator
        endindices = [(qf.index, qf.coords) for x in qf][-2]  # next() oversteps
>       assert endindices[0] == 5
E       assert 0 == 5

astropy/units/tests/test_quantity_array_methods.py:138: AssertionError

Could this be related to #11796 , @mhvk or @nstarman ?

Also see #11783, numpy/numpy#19153

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:12 (12 by maintainers)

github_iconTop GitHub Comments

2reactions
mhvkcommented, Jun 21, 2021

Yes, hopefully, things will just work with numpy-dev!

1reaction
pllimcommented, Jun 7, 2021

Looks like numpy/numpy#19153 is marked as a bug and slated to be fixed in Numpy 1.22. So, for now, perhaps we can xfail this test for numpy<=1.21 in the s390x job only?

Read more comments on GitHub >

github_iconTop Results From Across the Web

test_can_restrict_endianness fails on big-endian s390x #1164
Hi! test_can_restrict_endianness fails on s390x, the only big-endian architecture being tested in Ubuntu. ... Is this by design? The test fails ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found