kaiser_window#

ivy.kaiser_window(window_length, periodic=True, beta=12.0, *, dtype=None, out=None)[source]#

Compute the Kaiser window with window length window_length and shape beta.

Parameters:
  • window_length (int) – an int defining the length of the window.

  • periodic (bool, default: True) – If True, returns a periodic window suitable for use in spectral analysis. If False, returns a symmetric window suitable for use in filter design.

  • beta (float, default: 12.0) – a float used as shape parameter for the window.

  • dtype (Optional[Union[Dtype, NativeDtype]], default: None) – data type of the returned array.

  • out (Optional[Array], default: None) – optional output array, for writing the result to.

Return type:

Array

Returns:

ret – The array containing the window.

Examples

>>> ivy.kaiser_window(5)
ivy.array([5.2773e-05, 1.0172e-01, 7.9294e-01, 7.9294e-01, 1.0172e-01]])
>>> ivy.kaiser_window(5, True, 5)
ivy.array([0.0367, 0.4149, 0.9138, 0.9138, 0.4149])
>>> ivy.kaiser_window(5, False, 5)
ivy.array([0.0367, 0.5529, 1.0000, 0.5529, 0.0367])
Container.kaiser_window(self, periodic=True, beta=12.0, *, key_chains=None, to_apply=True, prune_unapplied=False, map_sequences=False, dtype=None, out=None)[source]#

ivy.Container instance method variant of ivy.kaiser_window. This method simply wraps the function, and so the docstring for ivy.kaiser_window also applies to this method with minimal changes.

Parameters:
  • self (Container) – input container including window lengths.

  • periodic (Union[bool, Container], default: True) – If True, returns a periodic window suitable for use in spectral analysis. If False, returns a symmetric window suitable for use in filter design.

  • beta (Union[float, Container], default: 12.0) – a float used as shape parameter for the window.

  • dtype (Optional[Union[Array, NativeArray, Container]], default: None) – data type of the returned array.

  • out (Optional[Container], default: None) – optional output container, for writing the result to.

Return type:

Container

Returns:

ret – The container that includes the Kaiser windows.

Examples

>>> x = ivy.Container(a=3, b=5)
>>> ivy.Container.static_kaiser_window(x, True, 5)
{
    a: ivy.array([0.2049, 0.8712, 0.8712]),
    a: ivy.array([0.0367, 0.7753, 0.7753]),
}