Skip to content

refactor: remove unused generics#12495

Merged
kgryte merged 1 commit into
developfrom
philipp/ndarray-dstdev-drop-generic
Jun 3, 2026
Merged

refactor: remove unused generics#12495
kgryte merged 1 commit into
developfrom
philipp/ndarray-dstdev-drop-generic

Conversation

@Planeshifter
Copy link
Copy Markdown
Member

Description

What is the purpose of this pull request?

This pull request removes the unused single-use generic type parameter from all six dstdev* signatures (dstdev, dstdevch, dstdevpn, dstdevtk, dstdevwd, dstdevyc), inlining the array element type to match the non-generic convention already used by dvariance, variance, and stdev. The return type is the fixed number, so type-checking behavior is unchanged.

This is part of a series of follow-up PRs addressing findings from a TypeScript declaration audit of the stats namespace (documentation-only fixes landed separately in #12482).

Related Issues

Does this pull request have any related issues?

No.

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

This change was surfaced by a Claude Code audit of the stats namespace TypeScript declarations. The fix was verified against the implementation and declaration test before submission, and reviewed by myself.


@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: na
  - task: lint_markdown_docs
    status: na
  - task: lint_markdown
    status: na
  - task: lint_package_json
    status: na
  - task: lint_repl_help
    status: na
  - task: lint_javascript_src
    status: na
  - task: lint_javascript_cli
    status: na
  - task: lint_javascript_examples
    status: na
  - task: lint_javascript_tests
    status: na
  - task: lint_javascript_benchmarks
    status: na
  - 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
---
@Planeshifter Planeshifter requested a review from a team June 3, 2026 05:05
@stdlib-bot
Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
stats/base/ndarray/dstdev $\color{green}123/123$
$\color{green}+100.00\%$
$\color{green}3/3$
$\color{green}+100.00\%$
$\color{green}1/1$
$\color{green}+100.00\%$
$\color{green}123/123$
$\color{green}+100.00\%$
stats/base/ndarray/dstdevch $\color{green}123/123$
$\color{green}+100.00\%$
$\color{green}3/3$
$\color{green}+100.00\%$
$\color{green}1/1$
$\color{green}+100.00\%$
$\color{green}123/123$
$\color{green}+100.00\%$
stats/base/ndarray/dstdevpn $\color{green}123/123$
$\color{green}+100.00\%$
$\color{green}3/3$
$\color{green}+100.00\%$
$\color{green}1/1$
$\color{green}+100.00\%$
$\color{green}123/123$
$\color{green}+100.00\%$
stats/base/ndarray/dstdevtk $\color{green}123/123$
$\color{green}+100.00\%$
$\color{green}3/3$
$\color{green}+100.00\%$
$\color{green}1/1$
$\color{green}+100.00\%$
$\color{green}123/123$
$\color{green}+100.00\%$
stats/base/ndarray/dstdevwd $\color{green}123/123$
$\color{green}+100.00\%$
$\color{green}3/3$
$\color{green}+100.00\%$
$\color{green}1/1$
$\color{green}+100.00\%$
$\color{green}123/123$
$\color{green}+100.00\%$
stats/base/ndarray/dstdevyc $\color{green}123/123$
$\color{green}+100.00\%$
$\color{green}3/3$
$\color{green}+100.00\%$
$\color{green}1/1$
$\color{green}+100.00\%$
$\color{green}123/123$
$\color{green}+100.00\%$

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

@Planeshifter Planeshifter marked this pull request as draft June 3, 2026 05:22
@stdlib-bot stdlib-bot added Statistics Issue or pull request related to statistical functionality. Needs Review A pull request which needs code review. and removed Needs Review A pull request which needs code review. labels Jun 3, 2026
@kgryte kgryte marked this pull request as ready for review June 3, 2026 07:21
@kgryte kgryte changed the title refactor: remove unused generics in stats/base/ndarray dstdev pkgs refactor: remove unused generics Jun 3, 2026
@kgryte kgryte merged commit 056a080 into develop Jun 3, 2026
54 checks passed
@kgryte kgryte deleted the philipp/ndarray-dstdev-drop-generic branch June 3, 2026 07:21
@stdlib-bot stdlib-bot added Needs Review A pull request which needs code review. and removed Needs Review A pull request which needs code review. labels Jun 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Statistics Issue or pull request related to statistical functionality.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants