Skip to content

Commit f7ef882

Browse files
committed
Some reverts
1 parent 8fd50b4 commit f7ef882

File tree

6 files changed

+8
-8
lines changed

6 files changed

+8
-8
lines changed

pandas/core/algorithms.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ def unique(values):
415415
416416
>>> pd.unique(pd.array([1 + 1j, 2, 3]))
417417
<NumpyExtensionArray>
418-
[np.complex128(1+1j), np.complex128(2+0j), np.complex128(3+0j)]
418+
[(1+1j), (2+0j), (3+0j)]
419419
Length: 3, dtype: complex128
420420
"""
421421
return unique_with_mask(values)

pandas/core/arrays/base.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1072,7 +1072,7 @@ def interpolate(
10721072
... limit_area="inside",
10731073
... )
10741074
<NumpyExtensionArray>
1075-
[np.float64(0.0), np.float64(1.0), np.float64(2.0), np.float64(3.0)]
1075+
[0.0, 1.0, 2.0, 3.0]
10761076
Length: 4, dtype: float64
10771077
10781078
Interpolating values in a FloatingArray:

pandas/core/arrays/interval.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1776,7 +1776,7 @@ def to_tuples(self, na_tuple: bool = True) -> np.ndarray:
17761776
Length: 2, dtype: interval[int64, right]
17771777
>>> idx.to_tuples()
17781778
array([(np.int64(0), np.int64(1)), (np.int64(1), np.int64(2))],
1779-
dtype=object)
1779+
dtype=object)
17801780
17811781
For :class:`pandas.IntervalIndex`:
17821782

pandas/core/arrays/numpy_.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ class NumpyExtensionArray( # type: ignore[misc]
8383
--------
8484
>>> pd.arrays.NumpyExtensionArray(np.array([0, 1, 2, 3]))
8585
<NumpyExtensionArray>
86-
[np.int64(0), np.int64(1), np.int64(2), np.int64(3)]
86+
[0, 1, 2, 3]
8787
Length: 4, dtype: int64
8888
"""
8989

pandas/core/base.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -558,7 +558,7 @@ def array(self) -> ExtensionArray:
558558
559559
>>> pd.Series([1, 2, 3]).array
560560
<NumpyExtensionArray>
561-
[np.int64(1), np.int64(2), np.int64(3)]
561+
[1, 2, 3]
562562
Length: 3, dtype: int64
563563
564564
For extension types, like Categorical, the actual ExtensionArray
@@ -1389,7 +1389,7 @@ def factorize(
13891389
Categories (4, object): ['apple' < 'bread' < 'cheese' < 'milk']
13901390
13911391
>>> ser.searchsorted('bread')
1392-
1
1392+
np.int64(1)
13931393
13941394
>>> ser.searchsorted(['bread'], side='right')
13951395
array([3])

pandas/core/construction.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ def array(
177177
178178
>>> pd.array(["a", "b"], dtype=str)
179179
<NumpyExtensionArray>
180-
[np.str_('a'), np.str_('b')]
180+
['a', 'b']
181181
Length: 2, dtype: str32
182182
183183
This would instead return the new ExtensionArray dedicated for string
@@ -186,7 +186,7 @@ def array(
186186
187187
>>> pd.array(["a", "b"], dtype=np.dtype("<U1"))
188188
<NumpyExtensionArray>
189-
[np.str_('a'), np.str_('b')]
189+
['a', 'b']
190190
Length: 2, dtype: str32
191191
192192
Finally, Pandas has arrays that mostly overlap with NumPy

0 commit comments

Comments
 (0)