Skip to content

Commit 5597cca

Browse files
GH1379 PR feedback
1 parent 657f38f commit 5597cca

File tree

3 files changed

+18
-5
lines changed

3 files changed

+18
-5
lines changed

pandas-stubs/core/series.pyi

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4689,6 +4689,22 @@ class Series(IndexOpsMixin[S1], NDFrame):
46894689
**kwargs,
46904690
) -> np_1darray[np.bytes_]: ...
46914691
@overload
4692+
def to_numpy(
4693+
self: Series[DateOffset],
4694+
dtype: None = None,
4695+
copy: bool = False,
4696+
na_value: Scalar = ...,
4697+
**kwargs,
4698+
) -> np_1darray[np.object_]: ...
4699+
@overload
4700+
def to_numpy(
4701+
self: Series[DateOffset],
4702+
dtype: type[np.bytes_],
4703+
copy: bool = False,
4704+
na_value: Scalar = ...,
4705+
**kwargs,
4706+
) -> np_1darray[np.bytes_]: ...
4707+
@overload
46924708
def to_numpy( # pyright: ignore[reportIncompatibleMethodOverride]
46934709
self,
46944710
dtype: DTypeLike | None = None,

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ scipy = { version = ">=1.9.1", python = "<3.14" }
6565
scipy-stubs = ">=1.15.3.0"
6666
SQLAlchemy = ">=2.0.39"
6767
types-python-dateutil = ">=2.8.19"
68-
beautifulsoup4 = ">=4.13.5"
68+
beautifulsoup4 = ">=4.14.2"
6969
html5lib = ">=1.1"
7070
python-calamine = ">=0.2.0"
7171

tests/test_timefuncs.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -945,10 +945,7 @@ def test_series_types_to_numpy() -> None:
945945
td_s = pd.to_timedelta(pd.Series([10, 20]), "minutes")
946946
ts_s = pd.to_datetime(pd.Series(["2020-01-01", "2020-01-02"]))
947947
p_s = pd.Series(pd.period_range("2012-1-1", periods=10, freq="D"))
948-
o_s = cast(
949-
"pd.Series[BaseOffset]",
950-
pd.Series([pd.DateOffset(days=1), pd.DateOffset(days=2)]),
951-
)
948+
o_s = pd.Series([pd.DateOffset(days=1), pd.DateOffset(days=2)])
952949
i_s = cast("IntervalSeries", pd.interval_range(1, 2).to_series())
953950

954951
# default dtype

0 commit comments

Comments
 (0)