def test_min_size_kernelcpd(signal_bkps_1D):
    """Make sure that KernelCPD can handled min_size=1.

    see https://github.com/deepcharles/ruptures/issues/269
    """
    signal, _ = signal_bkps_1D
    # test if the attribute min_size is set to 1
    algo = KernelCPD(kernel="rbf", min_size=1).fit(signal=signal)
    assert algo.min_size == 1

    # test if it can predict segments of size 1
    n_samples = signal.shape[0]
    algo.predict(n_bkps=n_samples - 1)
Make sure that KernelCPD can handled min_size=1.

    see https://github.com/deepcharles/ruptures/issues/269
    
tests/test_detection.py