From a31aa1018a2fa893d62c7c026232060c72d685f3 Mon Sep 17 00:00:00 2001 From: Jomithy <115196290+Jomithy@users.noreply.github.com> Date: Fri, 23 Jan 2026 09:26:01 -0600 Subject: [PATCH 1/2] Update findmaxima2d.pyx Addresses Overflow Error --- findmaxima2d/findmaxima2d.pyx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/findmaxima2d/findmaxima2d.pyx b/findmaxima2d/findmaxima2d.pyx index 4051db3..bdd8414 100644 --- a/findmaxima2d/findmaxima2d.pyx +++ b/findmaxima2d/findmaxima2d.pyx @@ -207,9 +207,9 @@ def find_maxima(img_data_py,local_max_py,ntol_py): # types[pListy[0:listlen],pListx[0:listlen]] =0 #else: if maxPossible == 1: - resetMask = ~(LISTED) + resetMask = ~(LISTED) & 0xFF else: - resetMask = ~(LISTED|EQUAL) + resetMask = ~(LISTED|EQUAL) & 0xFF #Now we calculate the x and y-coordinates, if there were any equal. xEqual /= nEqual From 58b5e175c172c6666e8d572ddb6a725a399ef9cc Mon Sep 17 00:00:00 2001 From: Jomithy <115196290+Jomithy@users.noreply.github.com> Date: Fri, 23 Jan 2026 09:26:34 -0600 Subject: [PATCH 2/2] Update cfindmaxima2d.pyx Addresses Overflow Error --- findmaxima2d/cfindmaxima2d.pyx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/findmaxima2d/cfindmaxima2d.pyx b/findmaxima2d/cfindmaxima2d.pyx index f6f1556..1f7e2fd 100644 --- a/findmaxima2d/cfindmaxima2d.pyx +++ b/findmaxima2d/cfindmaxima2d.pyx @@ -207,9 +207,9 @@ def find_maxima(img_data_py,local_max_py,ntol_py): # types[pListy[0:listlen],pListx[0:listlen]] =0 #else: if maxPossible == 1: - resetMask = ~(LISTED) + resetMask = ~(LISTED) & 0xFF else: - resetMask = ~(LISTED|EQUAL) + resetMask = ~(LISTED|EQUAL) & 0xFF #Now we calculate the x and y-coordinates, if there were any equal. xEqual /= nEqual