Skip to content

Commit e69a2df

Browse files
authored
Merge pull request #5519 from eteq/test-for-5163
Add regression test for issue from #5163
2 parents 4b895bf + 9a0a170 commit e69a2df

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

‎astropy/coordinates/tests/test_sky_coord.py‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1235,6 +1235,14 @@ 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+
1245+
12381246
def test_frame_attr_changes():
12391247
"""
12401248
This tests the case where a frame is added with a new frame attribute after

0 commit comments

Comments
 (0)