(self, key)
| 272 | return ufunc(*inputs, **kwargs) |
| 273 | |
| 274 | def __getitem__(self, key) -> PandasExtensionArray[T_ExtensionArray]: |
| 275 | if ( |
| 276 | isinstance(key, tuple) and len(key) == 1 |
| 277 | ): # pyarrow type arrays can't handle single-length tuples |
| 278 | (key,) = key |
| 279 | item = self.array[key] |
| 280 | if is_allowed_extension_array(item): |
| 281 | return PandasExtensionArray(item) |
| 282 | if is_scalar(item) or isinstance(key, int): |
| 283 | return PandasExtensionArray(type(self.array)._from_sequence([item])) # type: ignore[call-arg,attr-defined,unused-ignore] |
| 284 | return PandasExtensionArray(item) |
| 285 | |
| 286 | def __setitem__(self, key, val): |
| 287 | self.array[key] = val |
nothing calls this directly
no test coverage detected