Skip to content

Commit 113c333

Browse files
mtsokolhedeershowk
authored andcommitted
MAINT: Cleanup expired ndarray methods (pandas-dev#55180)
1 parent ffc94ad commit 113c333

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

doc/source/user_guide/gotchas.rst

+1-1
Original file line numberDiff line numberDiff 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

pandas/io/stata.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1773,7 +1773,7 @@ def read(
17731773
self._data_read = True
17741774
# if necessary, swap the byte order to native here
17751775
if self._byteorder != self._native_byteorder:
1776-
raw_data = raw_data.byteswap().newbyteorder()
1776+
raw_data = raw_data.byteswap().view(raw_data.dtype.newbyteorder())
17771777

17781778
if convert_categoricals:
17791779
self._read_value_labels()

0 commit comments

Comments
 (0)