Skip to content

Commit f931e7b

Browse files
committed
ENH: Seems right operators work now
1 parent 06c4e93 commit f931e7b

File tree

1 file changed

+6
-15
lines changed

1 file changed

+6
-15
lines changed

tests/test_core_ants_image.py

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -178,10 +178,10 @@ def test_new_image_like(self):
178178
vecimg = ants.from_numpy(np.random.randn(69,12,3).astype('float32'), has_components=True)
179179
new_data = np.random.randn(69,12,4).astype('float32')
180180
vecimg.new_image_like(new_data)
181-
181+
182182
def test_from_numpy_like(self):
183183
img = ants.image_read(ants.get_data('mni'))
184-
184+
185185
arr = img.numpy()
186186
arr *= 2
187187
img2 = ants.from_numpy_like(arr, img)
@@ -242,9 +242,6 @@ def test__add__(self):
242242
img3 = img + img2
243243

244244
def test__radd__(self):
245-
if os.name == "nt":
246-
return
247-
248245
#self.setUp()
249246
for img in self.imgs:
250247
# op on constant
@@ -283,9 +280,6 @@ def test__sub__(self):
283280
img3 = img - img2
284281

285282
def test__rsub__(self):
286-
#if os.name == "nt":
287-
# return
288-
289283
#self.setUp()
290284
for img in self.imgs:
291285
# op on constant
@@ -324,9 +318,6 @@ def test__mul__(self):
324318
img3 = img * img2
325319

326320
def test__rmul__(self):
327-
if os.name == "nt":
328-
return
329-
330321
#self.setUp()
331322
for img in self.imgs:
332323
# op on constant
@@ -666,21 +657,21 @@ def test_allclose(self):
666657
self.assertTrue(ants.allclose(img,img2))
667658
self.assertTrue(ants.allclose(img*6.9, img2*6.9))
668659
self.assertTrue(not ants.allclose(img, img2*6.9))
669-
660+
670661
def test_pickle(self):
671662
import ants
672663
import pickle
673664
img = ants.image_read( ants.get_ants_data("mni"))
674665
img_pickled = pickle.dumps(img)
675666
img2 = pickle.loads(img_pickled)
676-
667+
677668
self.assertTrue(ants.allclose(img, img2))
678669
self.assertTrue(ants.image_physical_space_consistency(img, img2))
679-
670+
680671
img = ants.image_read( ants.get_ants_data("r16"))
681672
img_pickled = pickle.dumps(img)
682673
img2 = pickle.loads(img_pickled)
683-
674+
684675
self.assertTrue(ants.allclose(img, img2))
685676
self.assertTrue(ants.image_physical_space_consistency(img, img2))
686677

0 commit comments

Comments
 (0)