def __getitem__(self, item): if is_integer(item): if self._mask[item]: return self.dtype.na_value return self._data[item] elif com.is_bool_indexer(item): item = check_bool_array_indexer(self, item) return type(self)(self._data[item], self._mask[item])
def __getitem__(self, item): if isinstance(item, type(self)): item = item._ndarray elif com.is_bool_indexer(item): item = check_bool_array_indexer(self, item) result = self._ndarray[item] if not lib.is_scalar(item): result = type(self)(result) return result