Skip to content

Delaunay error #12

@DaneMarc

Description

@DaneMarc

Hello again,

Don't mean to take up too much of your time, but trying to build the spatial graph using Delaunay brings up the following error. I've managed to replicate it with the test set as well.

Image

It seems to be a known issue with the squidpy spatial_neighbors delaunay function using numpy-specific indexing and not being able to handle dataframes. As mentioned in the issue, converting the spatial coordinates to a numpy array resolves this.

Perhaps adding something like

if isinstance(adata.obsm['spatial'], pd.DataFrame):
    adata.obsm['spatial'] = adata.obsm['spatial'].to_numpy()

in compute_spatial_neighbors could help.

Best,
Dane

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions