Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions surfa/image/interp.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,9 @@ def interpolate(source, target_shape, method, affine=None, disp=None, fill=0):
# ensure correct byteorder
# TODO maybe this should be done at read-time?
swap_byteorder = sys.byteorder == 'little' and '>' or '<'
source = source.byteswap().newbyteorder() if source.dtype.byteorder == swap_byteorder else source

if (source.dtype.byteorder == swap_byteorder):
source = source.byteswap().view(source.dtype.newbyteorder())

# a few types aren't supported, so let's just convert to float and convert back if necessary
unsupported_dtype = None
if source.dtype in (np.bool_,):
Expand Down
Loading