Skip to content

Commit 86a587f

Browse files
committed
add regression test for issue from astropy#5163
1 parent a47ccae commit 86a587f

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

‎astropy/coordinates/tests/test_sky_coord.py‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1235,6 +1235,15 @@ def test_spherical_offsets():
12351235
assert_allclose(dra, 1*u.deg)
12361236
assert_allclose(ddec, 1*u.deg)
12371237

1238+
# make sure an abbreviated array-based version of the above also works
1239+
i00s = SkyCoord([0]*4*u.arcmin, [0]*4*u.arcmin, frame='icrs')
1240+
i01s = SkyCoord([0]*4*u.arcmin, np.arange(4)*u.arcmin, frame='icrs')
1241+
dra, ddec = i00s.spherical_offsets_to(i01s)
1242+
assert_allclose(dra, 0*u.arcmin)
1243+
assert_allclose(ddec, np.arange(4)*u.arcmin)
1244+
1/0
1245+
1246+
12381247
def test_frame_attr_changes():
12391248
"""
12401249
This tests the case where a frame is added with a new frame attribute after

0 commit comments

Comments
 (0)