Skip to content

Commit c0a593c

Browse files
committed
change np.float_ to np.double
1 parent ab31818 commit c0a593c

File tree

4 files changed

+16
-16
lines changed

4 files changed

+16
-16
lines changed

pandas-stubs/core/resample.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ class Resampler(BaseGroupBy[NDFrameT]):
163163
def count(self: Resampler[DataFrame]) -> DataFrame: ...
164164
def quantile(
165165
self,
166-
q: float | list[float] | npt.NDArray[np.float_] | Series[float] = ...,
166+
q: float | list[float] | npt.NDArray[np.double] | Series[float] = ...,
167167
**kwargs,
168168
) -> NDFrameT: ...
169169

pandas-stubs/core/reshape/tile.pyi

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ def qcut(
250250
retbins: Literal[True],
251251
precision: int = ...,
252252
duplicates: Literal["raise", "drop"] = ...,
253-
) -> tuple[npt.NDArray[np.intp], npt.NDArray[np.float_]]: ...
253+
) -> tuple[npt.NDArray[np.intp], npt.NDArray[np.double]]: ...
254254
@overload
255255
def qcut(
256256
x: Series,
@@ -260,7 +260,7 @@ def qcut(
260260
retbins: Literal[True],
261261
precision: int = ...,
262262
duplicates: Literal["raise", "drop"] = ...,
263-
) -> tuple[Series, npt.NDArray[np.float_]]: ...
263+
) -> tuple[Series, npt.NDArray[np.double]]: ...
264264
@overload
265265
def qcut(
266266
x: Index | npt.NDArray | Sequence[int] | Sequence[float],
@@ -270,4 +270,4 @@ def qcut(
270270
retbins: Literal[True],
271271
precision: int = ...,
272272
duplicates: Literal["raise", "drop"] = ...,
273-
) -> tuple[Categorical, npt.NDArray[np.float_]]: ...
273+
) -> tuple[Categorical, npt.NDArray[np.double]]: ...

pandas-stubs/plotting/_core.pyi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ class PlotAccessor:
340340
| Callable[[gaussian_kde], float]
341341
| None
342342
) = ...,
343-
ind: npt.NDArray[np.float_] | int | None = ...,
343+
ind: npt.NDArray[np.double] | int | None = ...,
344344
*,
345345
subplots: Literal[False] | None = ...,
346346
**kwargs,
@@ -354,7 +354,7 @@ class PlotAccessor:
354354
| Callable[[gaussian_kde], float]
355355
| None
356356
) = ...,
357-
ind: npt.NDArray[np.float_] | int | None = ...,
357+
ind: npt.NDArray[np.double] | int | None = ...,
358358
*,
359359
subplots: Literal[True],
360360
**kwargs,

tests/test_pandas.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1004,10 +1004,10 @@ def test_qcut() -> None:
10041004
check(assert_type(c0, pd.Categorical), pd.Categorical)
10051005
check(assert_type(d0, pd.Series), pd.Series)
10061006

1007-
check(assert_type(a1, npt.NDArray[np.float_]), np.ndarray)
1008-
check(assert_type(b1, npt.NDArray[np.float_]), np.ndarray)
1009-
check(assert_type(c1, npt.NDArray[np.float_]), np.ndarray)
1010-
check(assert_type(d1, npt.NDArray[np.float_]), np.ndarray)
1007+
check(assert_type(a1, npt.NDArray[np.double]), np.ndarray)
1008+
check(assert_type(b1, npt.NDArray[np.double]), np.ndarray)
1009+
check(assert_type(c1, npt.NDArray[np.double]), np.ndarray)
1010+
check(assert_type(d1, npt.NDArray[np.double]), np.ndarray)
10111011

10121012
e0, e1 = pd.qcut(val_list, [0.25, 0.5, 0.75], retbins=True)
10131013
f0, f1 = pd.qcut(val_arr, np.array([0.25, 0.5, 0.75]), retbins=True)
@@ -1023,12 +1023,12 @@ def test_qcut() -> None:
10231023
check(assert_type(i0, npt.NDArray[np.intp]), np.ndarray)
10241024
check(assert_type(j0, npt.NDArray[np.intp]), np.ndarray)
10251025

1026-
check(assert_type(e1, npt.NDArray[np.float_]), np.ndarray)
1027-
check(assert_type(f1, npt.NDArray[np.float_]), np.ndarray)
1028-
check(assert_type(g1, npt.NDArray[np.float_]), np.ndarray)
1029-
check(assert_type(h1, npt.NDArray[np.float_]), np.ndarray)
1030-
check(assert_type(i1, npt.NDArray[np.float_]), np.ndarray)
1031-
check(assert_type(j1, npt.NDArray[np.float_]), np.ndarray)
1026+
check(assert_type(e1, npt.NDArray[np.double]), np.ndarray)
1027+
check(assert_type(f1, npt.NDArray[np.double]), np.ndarray)
1028+
check(assert_type(g1, npt.NDArray[np.double]), np.ndarray)
1029+
check(assert_type(h1, npt.NDArray[np.double]), np.ndarray)
1030+
check(assert_type(i1, npt.NDArray[np.double]), np.ndarray)
1031+
check(assert_type(j1, npt.NDArray[np.double]), np.ndarray)
10321032

10331033

10341034
def test_merge() -> None:

0 commit comments

Comments
 (0)