fourier_encode(x: Union[ivy.Array, ivy.NativeArray], max_freq: float, num_bands: int = 4, linear: bool = False) → Union[ivy.Array, ivy.NativeArray]¶
Pads an array with fourier encodings.
x (array) – Input array to encode.
max_freq (float) – The maximum frequency of the encoding.
num_bands (int, optional) – The number of frequency bands for the encoding. Default is 4.
linear (bool, optional) – Whether to space the frequency bands linearly as opposed to geometrically. Default is False.
New array with the final dimension expanded, and the encodings stored in this channel.