__getitem__¶
- array.__getitem__(key: int | slice | ellipsis | None | Tuple[int | slice | ellipsis | None, ...] | array, /) array ¶
Returns
self[key]
.See Indexing for details on supported indexing semantics.
- Parameters:
self (array) – array instance.
key (Union[int, slice, ellipsis, None, Tuple[Union[int, slice, ellipsis, None], ...], array]) – index key.
- Returns:
out (array) – an array containing the accessed value(s). The returned array must have the same data type as
self
.