spatialdata icon indicating copy to clipboard operation
spatialdata copied to clipboard

Parallel computation

Open tkcaccia opened this issue 5 months ago • 0 comments

I retrieving the Visium spot from a mask.

I found the procedure a little bit slow. Is it possible to parallelize the following code?

# Determine which spots are within the mask
points_within_mask = points_df.apply(lambda row: mask_geometry.contains(Point(row['x'], row['y'])), axis=1)
spots_in_mask = points_df[points_within_mask]

tkcaccia avatar Aug 29 '24 10:08 tkcaccia