anndata.settings.override#
- settings.override(*, remove_unused_categories=<no change>, check_uniqueness=<no change>, allow_write_nullable_strings=<no change>, use_sparse_array_on_read=<no change>, min_rows_for_chunked_h5_copy=<no change>, disallow_forward_slash_in_h5ad=<no change>, write_csr_csc_indices_with_min_possible_dtype=<no change>, auto_shard_zarr_v3=<no change>, restrict_index_types=<no change>)[source]#
Provides local override via keyword arguments as a context manager.
- Parameters:
- remove_unused_categories
bool(default:<no change>) Whether or not to remove unused categories with
Categorical.- check_uniqueness
bool(default:<no change>) Whether or not to check uniqueness of the
obsindices on__init__ofAnnData.- allow_write_nullable_strings
bool|None(default:<no change>) Whether or not to allow writing of
pd.arrays.[Arrow]StringArray. When set toNone, it will be inferred frompd.options.future.infer_string. When set toFalseexplicitly, we will try writingstringarrays in the old, non-nullable format.- use_sparse_array_on_read
bool(default:<no change>) Whether or not to use
scipy.sparse.sparrayas the default class when reading in data- min_rows_for_chunked_h5_copy
int(default:<no change>) Minimum number of rows at a time to copy when writing out an H5 Dataset to a new location
- disallow_forward_slash_in_h5ad
bool(default:<no change>) Whether or not to disallow the
/character in keys for h5ad files- write_csr_csc_indices_with_min_possible_dtype
bool(default:<no change>) Write a csr or csc matrix with the minimum possible data type for
indices, always unsigned integer.- auto_shard_zarr_v3
bool|None(default:<no change>) Whether or not to use zarr’s auto computation of sharding for v3. For v2 this setting will be ignored. The setting will apply to all calls to anndata’s writing mechanism (write_zarr / write_elem) and will not override any user-defined kwargs for shards.
- restrict_index_types
bool(default:<no change>) Whether to force coercion to a string index upon declaration of the
AnnDataobject or settingobs/var. “Setting this toFalsewill e.g. also allowMultiIndexindexes upon declaration/setting. “Only integer indices i.e., those caught bypandas.api.types.is_integer_dtype()will always be converted to strings.
- remove_unused_categories
- Return type: