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 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