spatialdata
spatialdata copied to clipboard
Parallel computation
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]