anndata.settings#

anndata.settings = SettingsManager( remove_unused_categories=True, check_uniqueness=True, allow_write_nullable_strings=False, use_sparse_array_on_read=False,  )[source]#

This manager allows users to customize settings for the anndata package. Settings here will generally be for advanced use-cases and should be used with caution.

The following options are available:

settings.remove_unused_categories: bool = True[source]#

Whether or not to remove unused categories with Categorical.

settings.check_uniqueness: bool = True[source]#

Whether or not to check uniqueness of the obs indices on __init__ of AnnData.

settings.allow_write_nullable_strings: bool = False[source]#

Whether or not to allow writing of pd.arrays.StringArray.

settings.use_sparse_array_on_read: bool = False[source]#

Whether or not to use scipy.sparse.sparray as the default class when reading in data

For setting an option please use override() (local) or set the above attributes directly (global) i.e., anndata.settings.my_setting = foo. For assignment by environment variable, use the variable name in all caps with ANNDATA_ as the prefix before import of anndata. For boolean environment variable setting, use 1 for True and 0 for False.