File tree 2 files changed +2
-2
lines changed
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:
379
379
.. ipython :: python
380
380
381
381
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
383
383
s = pd.Series(newx)
384
384
385
385
See `the NumPy documentation on byte order
Original file line number Diff line number Diff line change @@ -1771,7 +1771,7 @@ def read(
1771
1771
self ._data_read = True
1772
1772
# if necessary, swap the byte order to native here
1773
1773
if self ._byteorder != self ._native_byteorder :
1774
- raw_data = raw_data .byteswap ().newbyteorder ()
1774
+ raw_data = raw_data .byteswap ().view ( raw_data . dtype . newbyteorder () )
1775
1775
1776
1776
if convert_categoricals :
1777
1777
self ._read_value_labels ()
You can’t perform that action at this time.
0 commit comments