Skip to content

Add a lazy Hanning window generator - #2973

Open
umrndem wants to merge 1 commit into
xtensor-stack:masterfrom
umrndem:add-hanning-window
Open

umrndem wants to merge 1 commit into
xtensor-stack:masterfrom
umrndem:add-hanning-window

Conversation

@umrndem

@umrndem umrndem commented Nov 29, 2026

Copy link
Copy Markdown

Checklist

  • The title and commit message(s) are descriptive.
  • Small commits made to fix your PR have been squashed to avoid history pollution.
  • Tests have been added for new features or bug fixes.
  • API of new functions and classes are documented.

Description

Add xt::hanning for the Hanning window listed in #1608. It returns a lazy one-dimensional expression, defaults to double, and also supports other floating-point types. Non-positive sizes return an empty window and a size of one returns a single one, matching NumPy.

The tests cover odd and even reference windows, small sizes, float output, assignment and broadcasting. All 36 builder tests pass, including with address and undefined-behavior sanitizers. The CMake target also builds with warnings treated as errors.

Refs #1608; this only adds Hanning and leaves the other requested functions open.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant