next_fast_len#

pytorch_forecasting.utils.next_fast_len(size)[source]#

Returns the next largest number n >= size whose prime factors are all 2, 3, or 5. These sizes are efficient for fast fourier transforms. Equivalent to scipy.fftpack.next_fast_len().

Implementation from pyro

Parameters

size (int) – A positive number.

Returns

A possibly larger number.

Rtype int