amici.tools.is_count_data

Contents

amici.tools.is_count_data#

amici.tools.is_count_data(data, n_to_check=20)[source]#

Source: SCVI data utils (scverse/scvi-tools)

Approximately checks if the data to ensure it is count data.

Parameters:
  • data (pd.DataFrame | npt.NDArray | sp_sparse.spmatrix | h5py.Dataset) – The data to check if it is count data. It can be a pandas DataFrame, numpy array, scipy sparse matrix, or h5py Dataset.

  • n_to_check (int, optional) – The number of samples to check from the data. Defaults to 20.

Returns:

bool:

True if the data is count data, False otherwise.

Raises:

TypeError: – If the data type is not understood.