docstr: ivy.Container instance method variant of ivy.fourier_encode. This
  method simply wraps the function, and so the docstring for
  ivy.fourier_encode also applies to this method with minimal changes.
  
  Parameters
  ----------
  self
      Input container to apply fourier_encode at leaves.
  max_freq
      The maximum frequency of the encoding.
  num_bands
      The number of frequency bands for the encoding. Default is 4.
  linear
      Whether to space the frequency bands linearly as opposed to geometrically.
      Default is ``False``.
  flatten
      Whether to flatten the position dimension into the batch dimension.
      Default is ``False``.
  key_chains
      The key-chains to apply or not apply the method to. Default is ``None``.
  to_apply
      If True, the method will be applied to key_chains, otherwise key_chains
      will be skipped. Default is ``True``.
  prune_unapplied
      Whether to prune key_chains for which the function was not applied.
      Default is ``False``.
  map_sequences
      Whether to also map method to sequences (lists, tuples).
      Default is ``False``.
  dtype
      Data type of the returned array. Default is ``None``.
  out
      Optional output container. Default is ``None``.
  
  Returns
  -------
  ret
      New container with the final dimension expanded of arrays at its leaves,
      and the encodings stored in this channel.
  
  Examples
  --------
  >>> x = ivy.Container(a = ivy.array([1,2]),
  ...                   b = ivy.array([3,4]))
  >>> y = 1.5
  >>> z = x.fourier_encode(y)
  >>> print(z)
  {
      a: (<class ivy.data_classes.array.array.Array> shape=[2, 9]),
      b: (<class ivy.data_classes.array.array.Array> shape=[2, 9])
  }
  
  >>> x = ivy.Container(a = ivy.array([3,10]),
  ...                   b = ivy.array([4,8]))
  >>> y = 2.5
  >>> z = x.fourier_encode(y,num_bands=3)
  >>> print(z)
  {
      a: (<class ivy.data_classes.array.array.Array> shape=[2, 7]),
      b: (<class ivy.data_classes.array.array.Array> shape=[2, 7])
  }
docstr_tok: ["ivy.Container","instance","method","variant","of","ivy.fourier_encode",".","This","method","simply","wraps","the","function",",","and","so","the","docstring","for","ivy.fourier_encode","also","applies","to","this","method","with","minimal","changes",".","Parameters","--","--","--","--","--","self","Input","container","to","apply","fourier_encode","at","leaves",".","max_freq","The","maximum","frequency","of","the","encoding",".","num_bands","The","number","of","frequency","bands","for","the","encoding",".","Default","is","4.","linear","Whether","to","space","the","frequency","bands","linearly","as","opposed","to","geometrically",".","Default","is","``","False","``",".","flatten","Whether","to","flatten","the","position","dimension","into","the","batch","dimension",".","Default","is","``","False","``",".","key_chains","The","key-chains","to","apply","or","not","apply","the","method","to",".","Default","is","``","None","``",".","to_apply","If","True",",","the","method","will","be","applied","to","key_chains",",","otherwise","key_chains","will","be","skipped",".","Default","is","``","True","``",".","prune_unapplied","Whether","to","prune","key_chains","for","which","the","function","was","not","applied",".","Default","is","``","False","``",".","map_sequences","Whether","to","also","map","method","to","sequences","(","lists",",","tuples",")",".","Default","is","``","False","``",".","dtype","Data","type","of","the","returned","array",".","Default","is","``","None","``",".","out","Optional","output","container",".","Default","is","``","None","``",".","Returns","--","--","--","-","ret","New","container","with","the","final","dimension","expanded","of","arrays","at","its","leaves",",","and","the","encodings","stored","in","this","channel",".","Examples","--","--","--","--",">",">",">","x","=","ivy.Container","(","a","=","ivy.array","(","[","1,2","]",")",",","...","b","=","ivy.array","(","[","3,4","]",")",")",">",">",">","y","=","1.5",">",">",">","z","=","x.fourier_encode","(","y",")",">",">",">","print","(","z",")","{","a",":","(","<","class","ivy.data_classes.array.array.Array",">","shape=","[","2",",","9","]",")",",","b",":","(","<","class","ivy.data_classes.array.array.Array",">","shape=","[","2",",","9","]",")","}",">",">",">","x","=","ivy.Container","(","a","=","ivy.array","(","[","3,10","]",")",",","...","b","=","ivy.array","(","[","4,8","]",")",")",">",">",">","y","=","2.5",">",">",">","z","=","x.fourier_encode","(","y",",","num_bands=3",")",">",">",">","print","(","z",")","{","a",":","(","<","class","ivy.data_classes.array.array.Array",">","shape=","[","2",",","7","]",")",",","b",":","(","<","class","ivy.data_classes.array.array.Array",">","shape=","[","2",",","7","]",")","}"]
code: def fourier_encode(
      self: ivy.Container,
      max_freq: Union[float, ivy.Array, ivy.NativeArray, ivy.Container],
      /,
      *,
      num_bands: Union[int, ivy.Container] = 4,
      linear: Union[bool, ivy.Container] = False,
      flatten: Union[bool, ivy.Container] = False,
      key_chains: Optional[
          Union[List[str], Dict[str, str], ivy.Container]
      ] = None,
      to_apply: Union[bool, ivy.Container] = True,
      prune_unapplied: Union[bool, ivy.Container] = False,
      map_sequences: Union[bool, ivy.Container] = False,
  ) -> ivy.Container:
      """ivy.Container instance method variant of ivy.fourier_encode. This
      method simply wraps the function, and so the docstring for
      ivy.fourier_encode also applies to this method with minimal changes.
  
      Parameters
      ----------
      self
          Input container to apply fourier_encode at leaves.
      max_freq
          The maximum frequency of the encoding.
      num_bands
          The number of frequency bands for the encoding. Default is 4.
      linear
          Whether to space the frequency bands linearly as opposed to geometrically.
          Default is ``False``.
      flatten
          Whether to flatten the position dimension into the batch dimension.
          Default is ``False``.
      key_chains
          The key-chains to apply or not apply the method to. Default is ``None``.
      to_apply
          If True, the method will be applied to key_chains, otherwise key_chains
          will be skipped. Default is ``True``.
      prune_unapplied
          Whether to prune key_chains for which the function was not applied.
          Default is ``False``.
      map_sequences
          Whether to also map method to sequences (lists, tuples).
          Default is ``False``.
      dtype
          Data type of the returned array. Default is ``None``.
      out
          Optional output container. Default is ``None``.
  
      Returns
      -------
      ret
          New container with the final dimension expanded of arrays at its leaves,
          and the encodings stored in this channel.
  
      Examples
      --------
      >>> x = ivy.Container(a = ivy.array([1,2]),
      ...                   b = ivy.array([3,4]))
      >>> y = 1.5
      >>> z = x.fourier_encode(y)
      >>> print(z)
      {
          a: (<class ivy.data_classes.array.array.Array> shape=[2, 9]),
          b: (<class ivy.data_classes.array.array.Array> shape=[2, 9])
      }
  
      >>> x = ivy.Container(a = ivy.array([3,10]),
      ...                   b = ivy.array([4,8]))
      >>> y = 2.5
      >>> z = x.fourier_encode(y,num_bands=3)
      >>> print(z)
      {
          a: (<class ivy.data_classes.array.array.Array> shape=[2, 7]),
          b: (<class ivy.data_classes.array.array.Array> shape=[2, 7])
      }
      """
      return self._static_fourier_encode(
          self,
          max_freq,
          num_bands=num_bands,
          linear=linear,
          flatten=flatten,
          key_chains=key_chains,
          to_apply=to_apply,
          prune_unapplied=prune_unapplied,
          map_sequences=map_sequences,
      )
  
imports: from numbers import Number
  from typing import Any, Union, List, Dict, Iterable, Optional, Callable
  from ivy.data_classes.container.base import ContainerBase
  import ivy
label_desc: Use image node_id 20 for calling the _ContainerWithGeneral obj's underlying member method code with example usage: obj.fourier_encode() and returns: self