Fred Lefévère-Laoide 1 yıl önce
ebeveyn
işleme
3b00c0f5d4
1 değiştirilmiş dosya ile 0 ekleme ve 5 silme
  1. 0 5
      taipy/gui/data/decimator/rdp.py

+ 0 - 5
taipy/gui/data/decimator/rdp.py

@@ -83,7 +83,6 @@ class RDP(Decimator):
             # nothing to calculate if no points in between
             if end - start <= 1:
                 continue
-
             # Calculate distance to points
             P1 = data[start]
             P2 = data[end]
@@ -100,11 +99,9 @@ class RDP(Decimator):
                 mid = np.argmax(dsq) + 1 + start
                 stack.append((start, mid))  # type: ignore
                 stack.append((mid, end))  # type: ignore
-
             else:
                 # Points in between are redundant
                 mask[start + 1 : end] = False
-
         return mask
 
     @staticmethod
@@ -115,7 +112,6 @@ class RDP(Decimator):
             mask = np.empty(M_len, dtype=bool)
             mask.fill(True)
             return mask
-
         weights = np.empty(M_len)
         # weights.fill(0)
         weights[0] = float("inf")
@@ -132,7 +128,6 @@ class RDP(Decimator):
             weights[max_dist_index] = np.amax(dsq)
             stack.append((start, max_dist_index))
             stack.append((max_dist_index, end))
-
         maxTolerance = np.sort(weights)[M_len - n_out]
 
         return weights >= maxTolerance