ANTsImage operators don't work on Windows for right-sided operations
@ncullen93 looks like #547 is not working on Windows
Traceback (most recent call last):
File "D:\a\ANTsPy\ANTsPy\tests\test_core_ants_image.py", line 239, in test__radd__
img2 = 6.9 + img
TypeError: unsupported operand type(s) for +: 'float' and 'ANTsImage'
Thanks, I saw the windows build was failing and didnt realize it would fail the build if the tests fail. Now I know to check! It's a weird issue but I have tried to at least fix the tests. Couldn't find any reason why those operations would fail only in windows.
Yeah, it is a mystery to me as well. Works fine on Mac. As the error is with ANTsImage and not the numpy array, I infer that it's not finding the __radd__ function for some reason, rather than trying to run it and failing.
This works on all platforms:
im = ants.image_read(ants.get_ants_data('r16'))
im2 = im + 1
This works on Mac and Linux, but fails on Windows:
im = ants.image_read(ants.get_ants_data('r16'))
im2 = 1 + im