cast_X#

Pseudobulk.cast_X(dtype, /, *, cell_types=None, excluded_cell_types=None)[source]#

Cast each cell type’s X to the specified data type.

Parameters:
  • dtype : DTypeLike

    a NumPy data type

  • cell_types : str | Iterable[str] | None

    one or more cell types to operate on; if None, operate on all cell types. Mutually exclusive with excluded_cell_types.

  • excluded_cell_types : str | Iterable[str] | None

    one or more cell types to exclude from the operation; mutually exclusive with cell_types

Returns:

A new Pseudobulk dataset with each cell type’s X cast to the specified data type.

Return type:

Pseudobulk