-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
Labels
Description
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