Skip to content

Commit 6d1be80

Browse files
committed
fixup return type
1 parent 5193bd6 commit 6d1be80

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

pandas-stubs/core/indexes/period.pyi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ class PeriodIndex(DatetimeIndexOpsMixin[pd.Period, np.object_], PeriodIndexField
5656
self,
5757
where: pd.DatetimeIndex | PeriodIndex,
5858
mask: np.ndarray[tuple[int], np.dtype[np.bool_]],
59-
) -> Self: ...
59+
) -> np.ndarray[tuple[int], np.dtype[np.integer]]: ...
6060
@property
6161
def is_full(self) -> bool: ...
6262
@property

tests/test_indexes.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1509,6 +1509,8 @@ def test_period_index_asof_locs() -> None:
15091509
where = pd.DatetimeIndex(["2023-05-30 00:12:00", "2023-06-01 00:00:00"])
15101510
mask = np.ones(2, dtype=bool)
15111511
check(
1512-
assert_type(idx.asof_locs(where, mask), pd.PeriodIndex),
1513-
pd.PeriodIndex,
1512+
assert_type(
1513+
idx.asof_locs(where, mask), np.ndarray[tuple[int], np.dtype[np.integer]]
1514+
),
1515+
np.ndarray,
15141516
)

0 commit comments

Comments
 (0)