Skip to content

Question regarding updating adata.obsm #7

@ruochiz

Description

@ruochiz

Hi,

Thanks for creating this great package for on-disk anndata. I have a question regarding the obsm entry of the data. Is it possible to do a batch update or batch creation for the obsm in python? Sth like

b = {'a': array1, 'b': array2....}
adata.obsm.update(b)

I did a quick benchmarking of adata.obsm = b and a for loop that create each entry of b in adata.obsm, the former is much faster. However, it doesn't allow overlapping update (like b and adata.obsm have some overlapping keys, and for those, overwrite them with b) or just non-overlapping batch update. Any insights on how to achieve that would be greatly appreciated, thx.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions