return_lengths=True)
// FFT the filters
min_filter_length = np.min(lengths)
// Filters are padded up to the nearest integral power of 2
n_fft = basis.shape[1]
After Change
n_fft = basis.shape[1]
if hop_length is not None and n_fft < 2 * hop_length:
n_fft = int(2.0 ** (np.ceil(np.log2(2 * hop_length))))
// normalize by inverse length to compensate for phase invariance
basis *= lengths.reshape((-1, 1)) / n_fft
// FFT and retain only the non-negative frequencies
fft_basis = np.fft.fft(basis, n=n_fft, axis=1)[:, :(n_fft / 2)+1]