Skip to content

Commit cfae6ad

Browse files
committed
add check to fix #1217
1 parent c9af7c6 commit cfae6ad

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

suite2p/detection/sparsedetect.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -565,6 +565,8 @@ def sparsery(mov, sdmov, highpass_neuropil,
565565
scale, estimate_mode = find_best_scale(I=I, spatial_scale=spatial_scale)
566566

567567
spatscale_pix = 3 * 2**scale
568+
if isinstance(spatscale_pix, np.ndarray):
569+
spatscale_pix = spatscale_pix.item()
568570
mask_window = int(((spatscale_pix * 1.5) // 2) * 2)
569571
Th2 = threshold_scaling * 5 * max(
570572
1, scale) # threshold for accepted peaks (scale it by spatial scale)

0 commit comments

Comments
 (0)