def _fzerorise(sig):
    """Find zero-crossings on rising edge of a filtered signal."""

    pos = sig < 0
    zerorises = (pos[:-1] & ~pos[1:]).nonzero()[0]

    # In the rare case where no zero-crossing is found (peak and trough are same voltage),
    #   output dummy value.
    if len(zerorises) == 0:
        zerorises = [int(len(sig) / 2)]

    return zerorises