You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Traceback (most recent call last):
File "/home/mpohl/.local/lib/python3.10/site-packages/pandas/core/indexes/base.py", line 3805, in get_loc
return self._engine.get_loc(casted_key)
File "index.pyx", line 167, in pandas._libs.index.IndexEngine.get_loc
File "index.pyx", line 173, in pandas._libs.index.IndexEngine.get_loc
TypeError: '(array([18304, 19417, 3, 19416, 19418, 1], dtype=int32), slice(None, None, None))' is an invalid key
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/home/mpohl/.local/lib/python3.10/site-packages/squidpy/gr/_build.py", line 239, in spatial_neighbors
mats.append(_build_fun(adata[adata.obs[library_key] == lib]))
File "/home/mpohl/.local/lib/python3.10/site-packages/squidpy/gr/_build.py", line 293, in _spatial_neighbor
Adj, Dst = _build_connectivity(
File "/home/mpohl/.local/lib/python3.10/site-packages/squidpy/gr/_build.py", line 395, in _build_connectivity
dists = np.array(list(chain(*(
File "/home/mpohl/.local/lib/python3.10/site-packages/squidpy/gr/_build.py", line 396, in <genexpr>
euclidean_distances(coords[indices[indptr[i] : indptr[i + 1]], :], coords[np.newaxis, i, :])
File "/home/mpohl/.local/lib/python3.10/site-packages/pandas/core/frame.py", line 4102, in __getitem__
indexer = self.columns.get_loc(key)
File "/home/mpohl/.local/lib/python3.10/site-packages/pandas/core/indexes/base.py", line 3817, in get_loc
self._check_indexing_error(key)
File "/home/mpohl/.local/lib/python3.10/site-packages/pandas/core/indexes/base.py", line 6059, in _check_indexing_error
raise InvalidIndexError(key)
pandas.errors.InvalidIndexError: (array([18304, 19417, 3, 19416, 19418, 1], dtype=int32), slice(None, None, None))
I'm used to doing single-cell analysis in R but haven't had much python exposure, so any insights would be much appreciated.
Thanks!
The text was updated successfully, but these errors were encountered:
Hello,
I'm running into an issue in the very first step sq.gr.spatial_neighbors, whenever delaunay is set to True.
sq.gr.spatial_neighbors(adata = anndata, spatial_key = "spatial", coord_type = "generic", percentile = 99, n_neighs = 15, library_key= "sample") works, but sq.gr.spatial_neighbors(adata = anndata, spatial_key = "spatial", coord_type = "generic", percentile = 99, delaunay = True, library_key= "sample") crashes.
The full error message:
I'm used to doing single-cell analysis in R but haven't had much python exposure, so any insights would be much appreciated.
Thanks!
The text was updated successfully, but these errors were encountered: