Skip to content

docs: fix descriptions - #15863

Merged
kgryte merged 5 commits into
stdlib-js:developfrom
0PrashantYadav0:docs/stats-base-ndarray-jsdoc-fixes
Oct 12, 2026
Merged

kgryte merged 5 commits into
stdlib-js:developfrom
0PrashantYadav0:docs/stats-base-ndarray-jsdoc-fixes

Conversation

@0PrashantYadav0

Copy link
Copy Markdown
Member

Description

What is the purpose of this pull request?

This pull request:

  • fixes @returns annotations in stats/base/ndarray/{smaxabs,smaxabssorted,sminabs}/lib/main.js to describe the absolute value, matching their lib/native.js and the d* counterparts.
  • restores the full algorithm description in stats/base/ndarray/smeanlipw/lib/native.js, matching lib/main.js.
  • fixes a typo ("a Welford's algorithm") in stats/base/ndarray/dvariancewd/lib/native.js.
  • uses an en dash in "Kahan–Babuška" throughout stats/base/ndarray/smeankbn, matching its lib/main.js and dmeankbn.

Related Issues

Does this pull request have any related issues?

None.

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.".

I used Claude Code to scan stats/base/ndarray for documentation inconsistencies and to draft these fixes; I reviewed each change.


@stdlib-js/reviewers

…array`

-   Fix `@returns` annotations in `smaxabs`, `smaxabssorted`, and `sminabs` to describe the absolute value.
-   Restore the full algorithm description in `smeanlipw/lib/native.js`.
-   Fix "a Welford's algorithm" typo in `dvariancewd/lib/native.js`.
-   Use an en dash in "Kahan–Babuška" throughout `smeankbn`, matching `lib/main.js`.

---
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: na
  - task: lint_repl_help
    status: na
  - task: lint_javascript_src
    status: passed
  - 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: missing_dependencies
  - 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: na
  - task: lint_license_headers
    status: passed
---
@0PrashantYadav0
0PrashantYadav0 requested a review from a team October 3, 2026 17:19
@stdlib-bot stdlib-bot added Statistics Issue or pull request related to statistical functionality. Needs Review A pull request which needs code review. labels Oct 3, 2026
@stdlib-bot

stdlib-bot commented Oct 3, 2026 •

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
stats/base/ndarray/dvariancewd $\\color{green}204/204$
$\\color{green}+0.00\\%$
$\\color{green}7/7$
$\\color{green}+0.00\\%$
$\\color{green}2/2$
$\\color{green}+0.00\\%$
$\\color{green}204/204$
$\\color{green}+0.00\\%$
stats/base/ndarray/smaxabs $\\color{green}176/176$
$\\color{green}+0.00\\%$
$\\color{green}7/7$
$\\color{green}+0.00\\%$
$\\color{green}2/2$
$\\color{green}+0.00\\%$
$\\color{green}176/176$
$\\color{green}+0.00\\%$
stats/base/ndarray/smaxabssorted $\\color{green}176/176$
$\\color{green}+0.00\\%$
$\\color{green}7/7$
$\\color{green}+0.00\\%$
$\\color{green}2/2$
$\\color{green}+0.00\\%$
$\\color{green}176/176$
$\\color{green}+0.00\\%$
stats/base/ndarray/smeanlipw $\\color{green}176/176$
$\\color{green}+0.00\\%$
$\\color{green}7/7$
$\\color{green}+0.00\\%$
$\\color{green}2/2$
$\\color{green}+0.00\\%$
$\\color{green}176/176$
$\\color{green}+0.00\\%$
stats/base/ndarray/sminabs $\\color{green}176/176$
$\\color{green}+0.00\\%$
$\\color{green}7/7$
$\\color{green}+0.00\\%$
$\\color{green}2/2$
$\\color{green}+0.00\\%$
$\\color{green}176/176$
$\\color{green}+0.00\\%$

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

@kgryte kgryte added Documentation Improvements, additions, or changes to documentation. and removed Needs Review A pull request which needs code review. labels Oct 12, 2026

/**
* Computes the arithmetic mean of a one-dimensional single-precision floating-point ndarray using an improved Kahan-Babuška algorithm.
* Computes the arithmetic mean of a one-dimensional single-precision floating-point ndarray using an improved Kahan–Babuška algorithm.

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.

Suggested change
* Computes the arithmetic mean of a one-dimensional single-precision floating-point ndarray using an improved Kahan–Babuška algorithm.
* Computes the arithmetic mean of a one-dimensional single-precision floating-point ndarray using an improved Kahan-Babuška algorithm.

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.

Wrong hyphen. We should be using just a normal hyphen, not a Unicode dash.

@kgryte kgryte changed the title docs: fix descriptions and return value annotations in stats/base/ndarray docs: fix descriptions Oct 12, 2026
@kgryte
kgryte merged commit 287a20d into stdlib-js:develop Oct 12, 2026
11 checks passed
@0PrashantYadav0
0PrashantYadav0 deleted the docs/stats-base-ndarray-jsdoc-fixes branch October 13, 2026 05:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation Improvements, additions, or changes to documentation. Statistics Issue or pull request related to statistical functionality.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants