Skip to content

Commit f905e76

Browse files
committed
min window size to 3
1 parent 16d46ea commit f905e76

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

wordllama/algorithms/find_local_minima.pyx

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ cpdef tuple find_local_minima(np.ndarray[DTYPE_t, ndim=1] y, int window_size=11,
7979
Returns:
8080
tuple: Two numpy arrays, one for the indices of the local minima, and one for the values.
8181
"""
82-
if window_size % 2 == 0 or window_size < 1:
82+
if window_size % 2 == 0 or window_size < 3:
8383
raise ValueError("Window size must be an odd, positive integer.")
8484
if poly_order >= window_size:
8585
raise ValueError("Polynomial order cannot be larger than window size.")

0 commit comments

Comments
 (0)