tiledbsoma.SparseNDArray.delete_cells

SparseNDArray.delete_cells(coords: Sequence[None | int | Slice[int] | Sequence[int] | ndarray[tuple[Any, ...], dtype[integer]] | IntegerArray | ChunkedArray], *, platform_config: Dict[str, Mapping[str, Any]] | object | None = None) None

Deletes cells at the specified coordinates in a SparseNDArray.

Note: Deleting cells does not change the shape of the SparseNDArray.

Example deleting cells for soma_dim_1 >= 10000:
>>> with tiledbsoma.SparseNDArray(count_matrix_uri, mode="d") as X:
...     X.delete_cells(((slice(None, None), slice(10000, None)), value_filter="n_genes > 1000 and n_counts < 2000")
Parameters:

coords – A per-dimension Sequence of scalar, slice, sequence of scalar or Arrow IntegerArray <https://arrow.apache.org/docs/python/generated/pyarrow.IntegerArray.html> values defining the region to read.