File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed
src/spatialdata_io/readers Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -384,7 +384,8 @@ def _poly(arr: ArrayLike) -> Polygon:
384384 assert idx is not None
385385 assert len (idx ) == len (geo_df )
386386 assert np .unique (geo_df .index ).size == len (geo_df )
387- assert np .array_equal (index .to_numpy (), idx .to_numpy ())
387+ assert index .equals (idx )
388+ # assert np.array_equal(index.to_numpy(), idx.to_numpy())
388389 geo_df .index = idx
389390 else :
390391 geo_df .index = index
@@ -468,6 +469,8 @@ def _get_labels_and_indices_mapping(
468469 "label_index" : real_label_index .astype (np .int64 ),
469470 }
470471 )
472+ # because AnnData converts the indices to str
473+ indices_mapping .index = indices_mapping .index .astype (str )
471474 return labels , indices_mapping
472475
473476
@@ -497,6 +500,8 @@ def _get_cells_metadata_table_from_zarr(
497500
498501 cell_id_str = cell_id_str_from_prefix_suffix_uint32 (cell_id_prefix , dataset_suffix )
499502 df [XeniumKeys .CELL_ID ] = cell_id_str
503+ # because AnnData converts the indices to str
504+ df .index = df .index .astype (str )
500505 return df
501506
502507
You can’t perform that action at this time.
0 commit comments