def compute_nseconds(sig, fs):
    """Compute the length, in time, of a signal.

    Parameters
    ----------
    sig : 1d array
        Time series.
    fs : float
        Signal sampling rate, in Hz.

    Returns
    -------
    fs : float
        Signal duration, in seconds.
    """

    return len(sig) / fs