8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 907efd0 commit d3992c1Copy full SHA for d3992c1
lib/matplotlib/cbook/__init__.py
@@ -746,12 +746,9 @@ def safezip(*args):
746
def safe_masked_invalid(x, copy=False):
747
x = np.array(x, subok=True, copy=copy)
748
if not x.dtype.isnative:
749
- # Note that the argument to `byteswap` is 'inplace',
750
- # thus if we have already made a copy, do the byteswap in
751
- # place, else make a copy with the byte order swapped.
752
- # Be explicit that we are swapping the byte order of the dtype
753
- x = x.byteswap(copy).newbyteorder('S')
754
-
+ # If we have already made a copy, do the byteswap in place, else make a
+ # copy with the byte order swapped.
+ x = x.byteswap(inplace=copy).newbyteorder('native')
755
try:
756
xm = np.ma.masked_invalid(x, copy=False)
757
xm.shrink_mask()
0 commit comments