From a3ea569ec51771b19b5c65bd83a914db5765bf1f Mon Sep 17 00:00:00 2001 From: mrjholt Date: Tue, 9 Dec 2025 17:42:07 -0800 Subject: [PATCH] Fix: Fixed sampling bias in cell_boundaries by excluding endpoint --- src/cajal/sample_seg.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cajal/sample_seg.py b/src/cajal/sample_seg.py index 5379690..126c62c 100644 --- a/src/cajal/sample_seg.py +++ b/src/cajal/sample_seg.py @@ -80,7 +80,7 @@ def cell_boundaries( + " pixels around boundary of cell " + str(cell) ) - indices = np.linspace(0, boundary_pts.shape[0] - 1, n_sample) + indices = np.linspace(0, boundary_pts.shape[0] - 1, n_sample, endpoint=False) outlist.append((cell, boundary_pts[indices.astype("uint32")])) return list(outlist)