Workaround for ndimage.affine_transform endianness bug

Fixes #275.
I may be missing something but the `out` parameter is passed into the function to be modified. 

Another thing I thought of is that we probably want to do some scipy version check if the scipy bug gets fixed in the future.