obsm
obsm is a field of the AnnData data structure used in single-cell omics analysis (notably with Scanpy). It stores per-observation multidimensional representations, such as coordinate matrices for cells in low-dimensional embeddings or other per-observation projections.
Technically, obsm is a dictionary-like container that maps string keys to numpy arrays with shape (n_obs, n_dims).
Access and usage are straightforward. For example, coordinates = adata.obsm['X_umap'] yields the UMAP coordinates for all observations.
obsm complements other AnnData fields. While adata.X stores the primary expression data and adata.varm can hold
Memory considerations apply, as large embeddings increase the in-memory footprint. Users typically populate obsm with embeddings