Skip to content

Commit ec9cba8

Browse files
committed
make tests of representation arithmetic 2d
1 parent 499373f commit ec9cba8

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

‎astropy/coordinates/tests/test_representation_arithmetic.py‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,10 @@ class TestArithmetic():
3131
def setup(self):
3232
# Choose some specific coordinates, for which ``sum`` and ``dot``
3333
# works out nicely.
34-
self.lon = Longitude(np.arange(0, 12.1, 2), u.hourangle)
35-
self.lat = Latitude(np.arange(-90, 91, 30), u.deg)
36-
self.distance = [5., 12., 4., 2., 4., 12., 5.] * u.kpc
34+
# Also have the shape be at least 2d to make sure everythink works in n-d
35+
self.lon = Longitude([np.arange(0, 12.1, 2)]*4, u.hourangle)
36+
self.lat = Latitude([np.arange(-90, 91, 30)]*4, u.deg)
37+
self.distance = u.Quantity([[5., 12., 4., 2., 4., 12., 5.] * u.kpc]*4)
3738
self.spherical = SphericalRepresentation(self.lon, self.lat,
3839
self.distance)
3940
self.unit_spherical = self.spherical.represent_as(

0 commit comments

Comments
 (0)