indexes() might return an empty float64 array

Issue #39 closed
Dag Lofthus created an issue

This is the current code in indexes

    # check if the signal is totally flat
    if len(zeros) == len(y) - 1:
        return np.array([])

It should be fixed to be

    # check if the signal is totally flat
    if len(zeros) == len(y) - 1:
        return np.array([], dtype=np.int64)

Default for an numpy array is float64, so til will raise an error for anyone trying to use this as an index, which is what this is for

Comments (2)

  1. Log in to comment