Skip to content

Add the normalized sinc function - #2966

Open
Sinkleberg wants to merge 1 commit into
xtensor-stack:masterfrom
Sinkleberg:codex/normalized-sinc
Open

Sinkleberg wants to merge 1 commit into
xtensor-stack:masterfrom
Sinkleberg:codex/normalized-sinc

Conversation

@Sinkleberg

Copy link
Copy Markdown

Description

Adds xt::sinc(e), which evaluates sin(pi*x)/(pi*x) element by element and returns one at zero. It works lazily with arrays, views and composed expressions. This addresses the sinc item in #1608.

All 1,250 tests in the default suite passed. The sinc tests also passed with xsimd enabled, and Doxygen rendered the API entry. The float build emitted a conversion warning at the existing pi constant. Full Sphinx and pre-commit checks were not run.

Checklist

  • The title and commit message are descriptive.
  • The change is a single commit.
  • Tests cover the new function.
  • The API is documented.

Assisted-by: Codex:gpt-6.1-sol
@codspeed

codspeed Bot commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

1 warning

⚠️ Unable to measure the execution of 1 benchmark

This benchmark measured no execution time, so its result is not comparable and counts as unchanged. This usually happens when the compiler removes the code under test.

Prevent compiler optimizations

See affected benchmarks

✅ 255 untouched benchmarks


Comparing Sinkleberg:codex/normalized-sinc (8b9fdfe) with master (75abad5)

Open in CodSpeed

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