File tree Expand file tree Collapse file tree 1 file changed +1
-7
lines changed
Expand file tree Collapse file tree 1 file changed +1
-7
lines changed Original file line number Diff line number Diff line change @@ -143,17 +143,11 @@ def __init__(
143143 self .removed_level_full = index .levels [self .level ]
144144 self .unique_nan_index : int = - 1
145145 if not self .sort :
146- unique_codes = unique (self .index .codes [self .level ])
146+ unique_codes = np . unique (self .index .codes [self .level ])
147147 if self .has_nan :
148148 # drop nan codes, because they are not represented in level
149149 nan_mask = unique_codes == - 1
150150
151- if TYPE_CHECKING :
152- # make explicit that nan_mask is an array
153- # to remove this pyright diagnostic:
154- # The method "__invert__" in class "bool" is deprecated
155- nan_mask = cast (ArrayLike , nan_mask )
156-
157151 unique_codes = unique_codes [~ nan_mask ]
158152 self .unique_nan_index = np .flatnonzero (nan_mask )[0 ]
159153
You can’t perform that action at this time.
0 commit comments