Skip to content

Commit 93109dd

Browse files
committed
remove undocumented, refine view
1 parent 61e98b3 commit 93109dd

File tree

2 files changed

+5
-9
lines changed

2 files changed

+5
-9
lines changed

pandas-stubs/core/indexes/multi.pyi

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,15 @@ from pandas._typing import (
2525
Level,
2626
MaskType,
2727
NaPosition,
28+
NumpyNotTimeDtypeArg,
29+
NumpyTimedeltaDtypeArg,
30+
NumpyTimestampDtypeArg,
2831
SequenceNotStr,
2932
Shape,
3033
np_1darray_bool,
3134
np_1darray_int8,
3235
np_1darray_intp,
36+
np_ndarray,
3337
np_ndarray_anyint,
3438
)
3539

@@ -111,7 +115,7 @@ class MultiIndex(Index):
111115
def copy( # type: ignore[override] # pyright: ignore[reportIncompatibleMethodOverride] # pyrefly: ignore
112116
self, names: SequenceNotStr[Hashable] = ..., deep: bool = False
113117
) -> Self: ...
114-
def view(self, cls: Any = None) -> MultiIndex: ... # type: ignore[override] # pyrefly: ignore[bad-override] # pyright: ignore[reportIncompatibleMethodOverride]
118+
def view(self, cls: NumpyNotTimeDtypeArg | NumpyTimedeltaDtypeArg | NumpyTimestampDtypeArg | type[np_ndarray] | None = None) -> MultiIndex: ... # type: ignore[override] # pyrefly: ignore[bad-override] # pyright: ignore[reportIncompatibleMethodOverride]
115119
@property
116120
def dtype(self) -> np.dtype: ...
117121
@property
@@ -185,7 +189,6 @@ class MultiIndex(Index):
185189
def truncate(
186190
self, before: IndexLabel | None = None, after: IndexLabel | None = None
187191
) -> MultiIndex: ...
188-
def equal_levels(self, other: MultiIndex) -> bool: ...
189192
@overload # type: ignore[override]
190193
def isin( # pyrefly: ignore[bad-override]
191194
self, values: Iterable[Any], level: Level

tests/indexes/test_multi_indexes.py

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,6 @@ def test_multiindex_get_locs() -> None:
8484
check(assert_type(locs, np_1darray_intp), np_1darray_intp)
8585

8686

87-
def test_multiindex_equal_levels() -> None:
88-
mi = pd.MultiIndex.from_arrays([[1, 2, 3, 1], [4, 5, 6, 4]])
89-
mi2 = pd.MultiIndex.from_arrays([[1, 2, 3, 1], [4, 5, 6, 4]])
90-
eq = mi.equal_levels(mi2)
91-
check(assert_type(eq, bool), bool)
92-
93-
9487
def test_multiindex_get_loc_level() -> None:
9588
mi = pd.MultiIndex.from_arrays([[1, 2, 3, 1], [4, 5, 6, 4]])
9689
res_0, res_1 = mi.get_loc_level(1, level=0)

0 commit comments

Comments
 (0)