Skip to content

Commit 4a1543a

Browse files
author
arnaud de mattia
committed
fixing endianness for numpy>=2
1 parent 7601d05 commit 4a1543a

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

Corrfunc/utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -612,9 +612,9 @@ def convert_to_native_endian(array, warn=False):
612612
array_is_little_endian = (array.dtype.byteorder == '<')
613613
if (array_is_little_endian != system_is_little_endian) and not (array.dtype.byteorder == '='):
614614
if warn:
615-
warnings.warn("One or more input array has non-native endianness! A copy will"\
615+
warnings.warn("One or more input array has non-native endianness! A copy will"\
616616
" be made with the correct endianness.")
617-
array = array.byteswap().newbyteorder()
617+
array = np.array(array, order='C')
618618
return array
619619

620620

0 commit comments

Comments
 (0)