Started noticing this today. Numpy 1.21.0 was released two hours ago (2021-06-22 10 AM US Eastern).
py37-test run-test: commands[1] | pytest --pyargs astropy /__w/astropy/astropy/docs -n=4 --durations=50
============================= test session starts ==============================
platform linux -- Python 3.7.10, pytest-6.2.4, py-1.10.0, pluggy-0.13.1
cachedir: .tox/py37-test/.pytest_cache
Running tests with Astropy version 5.0.dev298+g7a8ff831e.
Running tests in astropy docs.
Date: 2021-06-22T11:58:29
Platform: Linux-5.8.0-1033-azure-x86_64-with-redhat-5.11-Final
Executable: /__w/astropy/astropy/.tox/py37-test/bin/python
Full Python Version:
3.7.10 (default, May 31 2021, 10:16:50)
[GCC 4.8.2 20140120 (Red Hat 4.8.2-15)]
encodings: sys: utf-8, locale: UTF-8, filesystem: utf-8
byteorder: little
float info: dig: 15, mant_dig: 15
Package versions:
Numpy: 1.21.0
Scipy: not available
Matplotlib: not available
h5py: not available
Pandas: not available
PyERFA: 2.0.0
Cython: not available
Scikit-image: not available
asdf: not available
Using Astropy options: remote_data: none.
ARCH_ON_CI: normal
IS_CRON: false
rootdir: /__w/astropy/astropy, configfile: setup.cfg
plugins: arraydiff-0.3, hypothesis-6.14.0, doctestplus-0.9.0, xdist-2.3.0, cov-2.12.1, astropy-header-0.1.2, filter-subpackage-0.1.1, remotedata-0.3.2, forked-1.3.0, openfiles-0.5.0
gw0 I / gw1 I / gw2 I / gw3 I
gw0 [16550] / gw1 [16550] / gw2 [16550] / gw3 [16550]
...
=================================== FAILURES ===================================
_________ TestArithmetic.test_add_sub[PhysicsSphericalRepresentation] __________
[gw1] linux -- Python 3.7.10 /__w/astropy/astropy/.tox/py37-test/bin/python
self = <astropy.coordinates.tests.test_representation_arithmetic.TestArithmetic object at 0xea7aca6c>
representation = <class 'astropy.coordinates.representation.PhysicsSphericalRepresentation'>
@pytest.mark.parametrize('representation',
(PhysicsSphericalRepresentation,
SphericalRepresentation,
CylindricalRepresentation))
def test_add_sub(self, representation):
in_rep = self.cartesian.represent_as(representation)
r1 = in_rep + in_rep
assert isinstance(r1, representation)
expected = 2. * in_rep
for component in in_rep.components:
assert_quantity_allclose(getattr(r1, component),
getattr(expected, component))
with pytest.raises(TypeError):
10.*u.m + in_rep
with pytest.raises(u.UnitsError):
in_rep + (in_rep / u.s)
r2 = in_rep - in_rep
assert isinstance(r2, representation)
> assert np.all(representation_equal(
r2.to_cartesian(), CartesianRepresentation(0.*u.m, 0.*u.m, 0.*u.m)))
E assert False
E + where False = <function all at 0xf1e430bc>(array([ True, True, True, True, True, False, True]))
E + where <function all at 0xf1e430bc> = np.all
E + and array([ True, True, True, True, True, False, True]) = representation_equal(<CartesianRepresentation (x, y, z) in kpc\n [(0.00000000e+00, 0.0000000e+00, 0.00000000e+00),\n (0.00000000e+00, ...0000e+00),\n (2.71917234e-32, 4.4408921e-16, 2.71917234e-32),\n (0.00000000e+00, 0.0000000e+00, 0.00000000e+00)]>, <CartesianRepresentation (x, y, z) in m\n (0., 0., 0.)>)
E + where <CartesianRepresentation (x, y, z) in kpc\n [(0.00000000e+00, 0.0000000e+00, 0.00000000e+00),\n (0.00000000e+00, ...0000e+00),\n (2.71917234e-32, 4.4408921e-16, 2.71917234e-32),\n (0.00000000e+00, 0.0000000e+00, 0.00000000e+00)]> = <bound method PhysicsSphericalRepresentation.to_cartesian of <PhysicsSphericalRepresentation (phi, theta, r) in (rad, ... , 0.0000000e+00),\n (1.57079633, 1.57079633, 4.4408921e-16),\n (0. , 0. , 0.0000000e+00)]>>()
E + where <bound method PhysicsSphericalRepresentation.to_cartesian of <PhysicsSphericalRepresentation (phi, theta, r) in (rad, ... , 0.0000000e+00),\n (1.57079633, 1.57079633, 4.4408921e-16),\n (0. , 0. , 0.0000000e+00)]>> = <PhysicsSphericalRepresentation (phi, theta, r) in (rad, rad, kpc)\n [(0. , 0. , 0.0000000e+00),\n .... , 0.0000000e+00),\n (1.57079633, 1.57079633, 4.4408921e-16),\n (0. , 0. , 0.0000000e+00)]>.to_cartesian
E + and <CartesianRepresentation (x, y, z) in m\n (0., 0., 0.)> = CartesianRepresentation((0.0 * Unit("m")), (0.0 * Unit("m")), (0.0 * Unit("m")))
E + where Unit("m") = u.m
E + and Unit("m") = u.m
E + and Unit("m") = u.m
../../.tox/py37-test/lib/python3.7/site-packages/astropy/coordinates/tests/test_representation_arithmetic.py:217: AssertionError
____________ TestArithmetic.test_add_sub[CylindricalRepresentation] ____________
[gw3] linux -- Python 3.7.10 /__w/astropy/astropy/.tox/py37-test/bin/python
self = <astropy.coordinates.tests.test_representation_arithmetic.TestArithmetic object at 0xea5e6cec>
representation = <class 'astropy.coordinates.representation.CylindricalRepresentation'>
@pytest.mark.parametrize('representation',
(PhysicsSphericalRepresentation,
SphericalRepresentation,
CylindricalRepresentation))
def test_add_sub(self, representation):
in_rep = self.cartesian.represent_as(representation)
r1 = in_rep + in_rep
assert isinstance(r1, representation)
expected = 2. * in_rep
for component in in_rep.components:
assert_quantity_allclose(getattr(r1, component),
getattr(expected, component))
with pytest.raises(TypeError):
10.*u.m + in_rep
with pytest.raises(u.UnitsError):
in_rep + (in_rep / u.s)
r2 = in_rep - in_rep
assert isinstance(r2, representation)
> assert np.all(representation_equal(
r2.to_cartesian(), CartesianRepresentation(0.*u.m, 0.*u.m, 0.*u.m)))
E assert False
E + where False = <function all at 0xf1e4b0bc>(array([ True, True, True, True, True, False, True]))
E + where <function all at 0xf1e4b0bc> = np.all
E + and array([ True, True, True, True, True, False, True]) = representation_equal(<CartesianRepresentation (x, y, z) in kpc\n [(0.00000000e+00, 0.0000000e+00, 0.),\n (0.00000000e+00, 0.0000000e+0....00000000e+00, 0.0000000e+00, 0.),\n (2.71917234e-32, 4.4408921e-16, 0.),\n (0.00000000e+00, 0.0000000e+00, 0.)]>, <CartesianRepresentation (x, y, z) in m\n (0., 0., 0.)>)
E + where <CartesianRepresentation (x, y, z) in kpc\n [(0.00000000e+00, 0.0000000e+00, 0.),\n (0.00000000e+00, 0.0000000e+0....00000000e+00, 0.0000000e+00, 0.),\n (2.71917234e-32, 4.4408921e-16, 0.),\n (0.00000000e+00, 0.0000000e+00, 0.)]> = <bound method CylindricalRepresentation.to_cartesian of <CylindricalRepresentation (rho, phi, z) in (kpc, rad, kpc)\n ... , 0.),\n (0.0000000e+00, 0. , 0.), (4.4408921e-16, 1.57079633, 0.),\n (0.0000000e+00, 0. , 0.)]>>()
E + where <bound method CylindricalRepresentation.to_cartesian of <CylindricalRepresentation (rho, phi, z) in (kpc, rad, kpc)\n ... , 0.),\n (0.0000000e+00, 0. , 0.), (4.4408921e-16, 1.57079633, 0.),\n (0.0000000e+00, 0. , 0.)]>> = <CylindricalRepresentation (rho, phi, z) in (kpc, rad, kpc)\n [(0.0000000e+00, 0. , 0.), (0.0000000e+00, 0. ... , 0.),\n (0.0000000e+00, 0. , 0.), (4.4408921e-16, 1.57079633, 0.),\n (0.0000000e+00, 0. , 0.)]>.to_cartesian
E + and <CartesianRepresentation (x, y, z) in m\n (0., 0., 0.)> = CartesianRepresentation((0.0 * Unit("m")), (0.0 * Unit("m")), (0.0 * Unit("m")))
E + where Unit("m") = u.m
E + and Unit("m") = u.m
E + and Unit("m") = u.m
../../.tox/py37-test/lib/python3.7/site-packages/astropy/coordinates/tests/test_representation_arithmetic.py:217: AssertionError
Started noticing this today. Numpy 1.21.0 was released two hours ago (2021-06-22 10 AM US Eastern).
Example log: https://github.com/astropy/astropy/runs/2886727419?check_suite_focus=true