File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -379,7 +379,7 @@ constructors using something similar to the following:
379379.. ipython :: python
380380
381381 x = np.array(list (range (10 )), " >i4" ) # big endian
382- newx = x.byteswap().newbyteorder() # force native byteorder
382+ newx = x.byteswap().view(x.dtype. newbyteorder() ) # force native byteorder
383383 s = pd.Series(newx)
384384
385385 See `the NumPy documentation on byte order
Original file line number Diff line number Diff line change @@ -1771,7 +1771,7 @@ def read(
17711771 self ._data_read = True
17721772 # if necessary, swap the byte order to native here
17731773 if self ._byteorder != self ._native_byteorder :
1774- raw_data = raw_data .byteswap ().newbyteorder ()
1774+ raw_data = raw_data .byteswap ().view ( raw_data . dtype . newbyteorder () )
17751775
17761776 if convert_categoricals :
17771777 self ._read_value_labels ()
You can’t perform that action at this time.
0 commit comments