@@ -112,7 +112,7 @@ def test_2_points_should_work(self):
112
112
bm = Basemap (llcrnrlon = 0 , llcrnrlat = - 80 , urcrnrlon = 360 , urcrnrlat = 80 , projection = 'mill' )
113
113
114
114
lons_expected = [10 , 15 , 20 ]
115
- lonsout = bm .shiftdata (lons_expected . copy () )
115
+ lonsout = bm .shiftdata (lons_expected [:] )
116
116
assert_almost_equal (lons_expected , lonsout )
117
117
118
118
lonsout_expected = bm .shiftdata ([10 , 361 , 362 ])
@@ -131,7 +131,7 @@ def test_1_point_should_work(self):
131
131
132
132
lonsin = np .array ([361.0 ])
133
133
lonsin .shape = (1 , 1 )
134
- lonsout = bm .shiftdata (lonsin . copy () )
134
+ lonsout = bm .shiftdata (lonsin [:] )
135
135
assert_almost_equal (lonsout .squeeze (), [1.0 ,])
136
136
137
137
def test_less_than_n_by_3_points_should_work (self ):
@@ -144,7 +144,7 @@ def test_less_than_n_by_3_points_should_work(self):
144
144
145
145
# shift n x 3 and n x 2 grids and compare results over overlapping region
146
146
lonsin = self ._get_2d_lons ([10 , 361 , 362 ])
147
- lonsout_expected = bm .shiftdata (lonsin . copy () )[:, :2 ]
147
+ lonsout_expected = bm .shiftdata (lonsin [:] )[:, :2 ]
148
148
lonsout = bm .shiftdata (lonsin [:, :2 ])
149
149
assert_almost_equal (lonsout_expected , lonsout )
150
150
0 commit comments