bartlett_window(window_length: _int, periodic: _bool = ..., dtype: DTypeLike = ..., device: DeviceLike = ..., requires_grad: _bool = ...)Bartlett (triangular) window, periodic by default.
Parameters
window_lengthint, boolThe length, and which of the two forms, as for
hann_window.periodicint, boolThe length, and which of the two forms, as for
hann_window.dtypeDTypeLike, DeviceLike, boolOutput dtype (floating point), device and gradient flag, as for
hann_window.deviceDTypeLike, DeviceLike, boolOutput dtype (floating point), device and gradient flag, as for
hann_window.requires_gradDTypeLike, DeviceLike, boolOutput dtype (floating point), device and gradient flag, as for
hann_window.Returns
TensorA 1-D tensor of window_length samples. It refuses what
hann_window refuses.
Notes
as lucid.signal.windows.bartlett with sym=not periodic.
Examples
>>> import lucid
>>> lucid.bartlett_window(4)
tensor([0., 0.5, 1., 0.5])