def comp_fft_freqs(time, is_time, is_positive):
    """Computes the frequency/wavenumber vector from the time/space vector
    Parameters
    ----------
    time: array
        Time or space vector
    is_time: bool
        Boolean indicating if we input time or space
    Returns
    -------
    Frequency/wavenumber vector
    """
    N_tot = time.size  # Number of samples
    # zero-padding
    # N_tot = int(2**(log(N_tot)//log(2)+1))
    timestep = float(time[1] - time[0])  # Sample step
    fsampt = 1.0 / timestep  # Sample frequency
    freqscale = N_tot / fsampt
    if is_positive:
        freqs = [i for i in range(int(N_tot / 2) + 1)]
    else:
        freqs = [i - int(N_tot / 2) for i in range(int(N_tot))]
    if is_time:
        freqs = [i / freqscale for i in freqs]
    return freqs