anndata.abc.CSCDataset.__getitem__

anndata.abc.CSCDataset.__getitem__#

abstractmethod CSCDataset.__getitem__(index)[source]#

Load a slice or an element from the sparse dataset into memory.

Parameters:
index int | str | int64 | slice | ndarray[tuple[Any, ...], dtype[bool]] | ndarray[tuple[Any, ...], dtype[integer]] | Sequence[int] | Sequence[str] | Sequence[bool] | Series | Index | ndarray[tuple[Any, ...], dtype[str_]] | matrix | csr_matrix | csc_matrix | csr_array | csc_array | EllipsisType | tuple[int | str | int64 | slice | ndarray[tuple[Any, ...], dtype[bool]] | ndarray[tuple[Any, ...], dtype[integer]] | Sequence[int] | Sequence[str] | Sequence[bool] | Series | Index | ndarray[tuple[Any, ...], dtype[str_]] | matrix | csr_matrix | csc_matrix | csr_array | csc_array, int | str | int64 | slice | ndarray[tuple[Any, ...], dtype[bool]] | ndarray[tuple[Any, ...], dtype[integer]] | Sequence[int] | Sequence[str] | Sequence[bool] | Series | Index | ndarray[tuple[Any, ...], dtype[str_]] | matrix | csr_matrix | csc_matrix | csr_array | csc_array | EllipsisType] | tuple[int | str | int64 | slice | ndarray[tuple[Any, ...], dtype[bool]] | ndarray[tuple[Any, ...], dtype[integer]] | Sequence[int] | Sequence[str] | Sequence[bool] | Series | Index | ndarray[tuple[Any, ...], dtype[str_]] | matrix | csr_matrix | csc_matrix | csr_array | csc_array | EllipsisType, int | str | int64 | slice | ndarray[tuple[Any, ...], dtype[bool]] | ndarray[tuple[Any, ...], dtype[integer]] | Sequence[int] | Sequence[str] | Sequence[bool] | Series | Index | ndarray[tuple[Any, ...], dtype[str_]] | matrix | csr_matrix | csc_matrix | csr_array | csc_array] | tuple[int | str | int64 | slice | ndarray[tuple[Any, ...], dtype[bool]] | ndarray[tuple[Any, ...], dtype[integer]] | Sequence[int] | Sequence[str] | Sequence[bool] | Series | Index | ndarray[tuple[Any, ...], dtype[str_]] | matrix | csr_matrix | csc_matrix | csr_array | csc_array, int | str | int64 | slice | ndarray[tuple[Any, ...], dtype[bool]] | ndarray[tuple[Any, ...], dtype[integer]] | Sequence[int] | Sequence[str] | Sequence[bool] | Series | Index | ndarray[tuple[Any, ...], dtype[str_]] | matrix | csr_matrix | csc_matrix | csr_array | csc_array, EllipsisType] | tuple[EllipsisType, int | str | int64 | slice | ndarray[tuple[Any, ...], dtype[bool]] | ndarray[tuple[Any, ...], dtype[integer]] | Sequence[int] | Sequence[str] | Sequence[bool] | Series | Index | ndarray[tuple[Any, ...], dtype[str_]] | matrix | csr_matrix | csc_matrix | csr_array | csc_array, int | str | int64 | slice | ndarray[tuple[Any, ...], dtype[bool]] | ndarray[tuple[Any, ...], dtype[integer]] | Sequence[int] | Sequence[str] | Sequence[bool] | Series | Index | ndarray[tuple[Any, ...], dtype[str_]] | matrix | csr_matrix | csc_matrix | csr_array | csc_array] | tuple[int | str | int64 | slice | ndarray[tuple[Any, ...], dtype[bool]] | ndarray[tuple[Any, ...], dtype[integer]] | Sequence[int] | Sequence[str] | Sequence[bool] | Series | Index | ndarray[tuple[Any, ...], dtype[str_]] | matrix | csr_matrix | csc_matrix | csr_array | csc_array, EllipsisType, int | str | int64 | slice | ndarray[tuple[Any, ...], dtype[bool]] | ndarray[tuple[Any, ...], dtype[integer]] | Sequence[int] | Sequence[str] | Sequence[bool] | Series | Index | ndarray[tuple[Any, ...], dtype[str_]] | matrix | csr_matrix | csc_matrix | csr_array | csc_array]

Index to load.

Return type:

float | csr_matrix | csc_matrix | csr_array | csc_array

Returns:

The desired data read off disk.