Skip to content

feat: add fft/fftpack/rffti - #16338

Open
gunjjoshi wants to merge 12 commits into
stdlib-js:developfrom
gunjjoshi:fft-rffti
Open

gunjjoshi wants to merge 12 commits into
stdlib-js:developfrom
gunjjoshi:fft-rffti

Conversation

@gunjjoshi

@gunjjoshi gunjjoshi commented Oct 28, 2026 •

Copy link
Copy Markdown
Member

type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes. report:

  • task: lint_filenames status: passed
  • task: lint_editorconfig status: passed
  • task: lint_markdown_pkg_readmes status: passed
  • task: lint_markdown_docs status: na
  • task: lint_markdown status: na
  • task: lint_package_json status: passed
  • task: lint_repl_help status: passed
  • task: lint_javascript_src status: passed
  • task: lint_javascript_cli status: na
  • task: lint_javascript_examples status: passed
  • task: lint_javascript_tests status: passed
  • task: lint_javascript_benchmarks status: passed
  • task: lint_python status: na
  • task: lint_r status: na
  • task: lint_c_src status: na
  • task: lint_c_examples status: na
  • task: lint_c_benchmarks status: na
  • task: lint_c_tests_fixtures status: na
  • task: lint_shell status: na
  • task: lint_typescript_declarations status: passed
  • task: lint_typescript_tests status: passed
  • task: lint_license_headers status: passed ---

Resolves a part of stdlib-js/metr-issue-tracker#1385.

Description

What is the purpose of this pull request?

This pull request:

Related Issues

Does this pull request have any related issues?

This pull request has the following related issues:

Reference Packages

Did the content of this pull request follow one or more existing packages? Answering is optional.

This pull request followed these packages:

What carried over from the reference(s)?

  • test structure, docs, benchmarks, and some part of the implementation.

What differed, or what did you have to work out yourself?

  • The logic of having a workspace array differed.

Questions

Any questions for reviewers of this pull request?

No.

Other

Any other information relevant to this pull request? This may include screenshots, references, and/or implementation notes.

No.

Checklist

Please ensure the following tasks are completed before submitting this pull request.

AI Assistance

When authoring the changes proposed in this PR, did you use any kind of AI assistance?

  • Yes
  • No

If you answered "yes" above, how did you use AI assistance?

  • Code generation (e.g., when writing an implementation or fixing a bug)
  • Test/benchmark generation
  • Documentation (including examples)
  • Research and understanding

Disclosure

If you answered "yes" to using AI assistance, please provide a short disclosure indicating how you used AI assistance. This helps reviewers determine how much scrutiny to apply when reviewing your contribution. Example disclosures: "This PR was written primarily by Claude Code." or "I consulted ChatGPT to understand the codebase, but the proposed changes were fully authored manually by myself.".

Used Claude code to help with implementation and research, and then did a manual review.


@stdlib-js/reviewers

---
type: pre_commit_static_analysis_report
description: Results of running static analysis checks when committing changes.
report:
  - task: lint_filenames
    status: passed
  - task: lint_editorconfig
    status: passed
  - task: lint_markdown_pkg_readmes
    status: passed
  - task: lint_markdown_docs
    status: na
  - task: lint_markdown
    status: na
  - task: lint_package_json
    status: passed
  - task: lint_repl_help
    status: passed
  - task: lint_javascript_src
    status: passed
  - task: lint_javascript_cli
    status: na
  - task: lint_javascript_examples
    status: passed
  - task: lint_javascript_tests
    status: passed
  - task: lint_javascript_benchmarks
    status: passed
  - task: lint_python
    status: na
  - task: lint_r
    status: na
  - task: lint_c_src
    status: na
  - task: lint_c_examples
    status: na
  - task: lint_c_benchmarks
    status: na
  - task: lint_c_tests_fixtures
    status: na
  - task: lint_shell
    status: na
  - task: lint_typescript_declarations
    status: passed
  - task: lint_typescript_tests
    status: passed
  - task: lint_license_headers
    status: passed
---
@gunjjoshi
gunjjoshi requested a review from a team October 28, 2026 15:02
@gunjjoshi gunjjoshi added the METR Pull request associated with the METR project. label Oct 28, 2026
@stdlib-bot stdlib-bot added Needs Review A pull request which needs code review. labels Oct 28, 2026
@stdlib-bot

stdlib-bot commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
fft/fftpack/rffti $\\color{green}421/421$
$\\color{green}+100.00\\%$
$\\color{green}24/24$
$\\color{green}+100.00\\%$
$\\color{green}3/3$
$\\color{green}+100.00\\%$
$\\color{green}421/421$
$\\color{green}+100.00\\%$

The above coverage report was generated for the changes in this PR.

@kgryte kgryte added the Feature Issue or pull request for adding a new feature. label Oct 28, 2026
Comment thread lib/node_modules/@stdlib/fft/rffti/benchmark/benchmark.assign.js Outdated
Comment thread lib/node_modules/@stdlib/fft/rffti/benchmark/benchmark.js Outdated
Co-authored-by: Athan <kgryte@gmail.com>
Signed-off-by: Athan <kgryte@gmail.com>
Comment thread lib/node_modules/@stdlib/fft/rffti/docs/types/index.d.ts Outdated
Comment thread lib/node_modules/@stdlib/fft/rffti/docs/types/index.d.ts Outdated
Co-authored-by: Athan <kgryte@gmail.com>
Signed-off-by: Athan <kgryte@gmail.com>
Comment thread lib/node_modules/@stdlib/fft/rffti/docs/repl.txt Outdated
Signed-off-by: Athan <kgryte@gmail.com>
Comment thread lib/node_modules/@stdlib/fft/rffti/lib/assign.js Outdated
Comment thread lib/node_modules/@stdlib/fft/rffti/lib/assign.js Outdated
Comment thread lib/node_modules/@stdlib/fft/rffti/lib/assign.js Outdated
Comment thread lib/node_modules/@stdlib/fft/rffti/lib/assign.js Outdated
Comment thread lib/node_modules/@stdlib/fft/rffti/lib/base.js Outdated
Comment thread lib/node_modules/@stdlib/fft/rffti/lib/dtypes.js Outdated
Comment thread lib/node_modules/@stdlib/fft/rffti/lib/index.js Outdated
Comment thread lib/node_modules/@stdlib/fft/rffti/lib/index.js Outdated
Co-authored-by: Athan <kgryte@gmail.com>
Signed-off-by: Athan <kgryte@gmail.com>
Comment thread lib/node_modules/@stdlib/fft/rffti/lib/main.js Outdated
Co-authored-by: Athan <kgryte@gmail.com>
Signed-off-by: Athan <kgryte@gmail.com>

t.strictEqual( out, ws, 'returns expected value' );
t.strictEqual( String( getDType( out ) ), 'float64', 'returns expected value' );

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest actually testing the workspace contents here.

t.strictEqual( String( getDType( out ) ), 'float32', 'returns expected value' );

t.end();
});

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you also should test for a "generic" output array.


t.strictEqual( String( getDType( ws ) ), 'float32', 'returns expected value' );
t.deepEqual( getShape( ws ), [ 42 ], 'returns expected value' );

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest testing for the values here.

Comment thread lib/node_modules/@stdlib/fft/rffti/README.md Outdated
Comment thread lib/node_modules/@stdlib/fft/rffti/README.md Outdated
Co-authored-by: Athan <kgryte@gmail.com>
Signed-off-by: Athan <kgryte@gmail.com>

@kgryte kgryte left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed, let's move this package to fft/fftpack/rffti, as this API is FFTPACK-specific.

@kgryte kgryte added Needs Changes Pull request which needs changes before being merged. and removed Needs Review A pull request which needs code review. labels Oct 28, 2026
@gunjjoshi

Copy link
Copy Markdown
Member Author

@kgryte I have now updated the tests to check for the values inside the workspace array, for float64, float32 and generic ndarrays, similar to that in https://github.com/stdlib-js/stdlib/blob/develop/lib/node_modules/%40stdlib/fft/base/fftpack/ndarray/float64/rffti/test/test.js#L65.

@gunjjoshi gunjjoshi changed the title feat: add fft/rffti feat: add fft/fftpack/rffti Oct 29, 2026
@gunjjoshi

Copy link
Copy Markdown
Member Author

As discussed, let's move this package to fft/fftpack/rffti, as this API is FFTPACK-specific.

Done.

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

Feature Issue or pull request for adding a new feature. METR Pull request associated with the METR project. Needs Changes Pull request which needs changes before being merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants