docstr: ivy.Array 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 array to encode
  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``.
  concat
      Whether to concatenate the position, sin and cos values, or return
      separately. Default is ``True``.
  flatten
      Whether to flatten the position dimension into the batch dimension.
      Default is ``False``.
  
  Returns
  -------
  ret
      New array with the final dimension expanded, and the encodings stored in
      this channel.
  
  Examples
  --------
  >>> x = ivy.array([1, 2, 3])
  >>> y = 1.5
  >>> z = x.fourier_encode(y)
  >>> print(z)
  ivy.array([[ 1.0000000e+00, 1.2246468e-16, 0.0000000e+00, 0.0000000e+00,
               0.0000000e+00, -1.0000000e+00, 1.0000000e+00, 1.0000000e+00,
               1.0000000e+00],
             [ 2.0000000e+00, -2.4492936e-16, 0.0000000e+00, 0.0000000e+00,
               0.0000000e+00, 1.0000000e+00, 1.0000000e+00, 1.0000000e+00,
               1.0000000e+00],
             [ 3.0000000e+00, 3.6739404e-16, 0.0000000e+00, 0.0000000e+00,
               0.0000000e+00, -1.0000000e+00, 1.0000000e+00, 1.0000000e+00,
               1.0000000e+00]])
  
  >>> x = ivy.array([3, 10])
  >>> y = 2.5
  >>> z = x.fourier_encode(y, num_bands=3)
  >>> print(z)
  ivy.array([[ 3.0000000e+00,  3.6739404e-16,  3.6739404e-16,  3.6739404e-16,
              -1.0000000e+00, -1.0000000e+00, -1.0000000e+00],
             [ 1.0000000e+01, -1.2246468e-15, -1.2246468e-15, -1.2246468e-15,
               1.0000000e+00,  1.0000000e+00,  1.0000000e+00]])
docstr_tok: ["ivy.Array","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","array","to","encode","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","``",".","concat","Whether","to","concatenate","the","position",",","sin","and","cos","values",",","or","return","separately",".","Default","is","``","True","``",".","flatten","Whether","to","flatten","the","position","dimension","into","the","batch","dimension",".","Default","is","``","False","``",".","Returns","--","--","--","-","ret","New","array","with","the","final","dimension","expanded",",","and","the","encodings","stored","in","this","channel",".","Examples","--","--","--","--",">",">",">","x","=","ivy.array","(","[","1",",","2",",","3","]",")",">",">",">","y","=","1.5",">",">",">","z","=","x.fourier_encode","(","y",")",">",">",">","print","(","z",")","ivy.array","(","[","[","1.0000000e+00",",","1.2246468e-16",",","0.0000000e+00",",","0.0000000e+00",",","0.0000000e+00",",","-1.0000000e+00",",","1.0000000e+00",",","1.0000000e+00",",","1.0000000e+00","]",",","[","2.0000000e+00",",","-2.4492936e-16",",","0.0000000e+00",",","0.0000000e+00",",","0.0000000e+00",",","1.0000000e+00",",","1.0000000e+00",",","1.0000000e+00",",","1.0000000e+00","]",",","[","3.0000000e+00",",","3.6739404e-16",",","0.0000000e+00",",","0.0000000e+00",",","0.0000000e+00",",","-1.0000000e+00",",","1.0000000e+00",",","1.0000000e+00",",","1.0000000e+00","]","]",")",">",">",">","x","=","ivy.array","(","[","3",",","10","]",")",">",">",">","y","=","2.5",">",">",">","z","=","x.fourier_encode","(","y",",","num_bands=3",")",">",">",">","print","(","z",")","ivy.array","(","[","[","3.0000000e+00",",","3.6739404e-16",",","3.6739404e-16",",","3.6739404e-16",",","-1.0000000e+00",",","-1.0000000e+00",",","-1.0000000e+00","]",",","[","1.0000000e+01",",","-1.2246468e-15",",","-1.2246468e-15",",","-1.2246468e-15",",","1.0000000e+00",",","1.0000000e+00",",","1.0000000e+00","]","]",")"]
code: def fourier_encode(
      self: ivy.Array,
      max_freq: Union[float, ivy.Array, ivy.NativeArray],
      /,
      *,
      num_bands: int = 4,
      linear: bool = False,
      concat: bool = True,
      flatten: bool = False,
  ) -> Union[ivy.Array, ivy.NativeArray, Tuple]:
      """ivy.Array 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 array to encode
      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``.
      concat
          Whether to concatenate the position, sin and cos values, or return
          separately. Default is ``True``.
      flatten
          Whether to flatten the position dimension into the batch dimension.
          Default is ``False``.
  
      Returns
      -------
      ret
          New array with the final dimension expanded, and the encodings stored in
          this channel.
  
      Examples
      --------
      >>> x = ivy.array([1, 2, 3])
      >>> y = 1.5
      >>> z = x.fourier_encode(y)
      >>> print(z)
      ivy.array([[ 1.0000000e+00, 1.2246468e-16, 0.0000000e+00, 0.0000000e+00,
                   0.0000000e+00, -1.0000000e+00, 1.0000000e+00, 1.0000000e+00,
                   1.0000000e+00],
                 [ 2.0000000e+00, -2.4492936e-16, 0.0000000e+00, 0.0000000e+00,
                   0.0000000e+00, 1.0000000e+00, 1.0000000e+00, 1.0000000e+00,
                   1.0000000e+00],
                 [ 3.0000000e+00, 3.6739404e-16, 0.0000000e+00, 0.0000000e+00,
                   0.0000000e+00, -1.0000000e+00, 1.0000000e+00, 1.0000000e+00,
                   1.0000000e+00]])
  
      >>> x = ivy.array([3, 10])
      >>> y = 2.5
      >>> z = x.fourier_encode(y, num_bands=3)
      >>> print(z)
      ivy.array([[ 3.0000000e+00,  3.6739404e-16,  3.6739404e-16,  3.6739404e-16,
                  -1.0000000e+00, -1.0000000e+00, -1.0000000e+00],
                 [ 1.0000000e+01, -1.2246468e-15, -1.2246468e-15, -1.2246468e-15,
                   1.0000000e+00,  1.0000000e+00,  1.0000000e+00]])
      """
      return ivy.fourier_encode(
          self,
          max_freq,
          num_bands=num_bands,
          linear=linear,
          concat=concat,
          flatten=flatten,
      )
  
imports: import abc
  import numpy
  from numbers import Number
  from typing import Any, Iterable, Union, Optional, Dict, Callable, List, Tuple
  import ivy
label_desc: Use image node_id 23 for calling the _ArrayWithGeneral obj's underlying member method code with example usage: obj.fourier_encode() and returns: ivy