Skip to content

docs: correct grammar in descriptions#12461

Merged
kgryte merged 1 commit into
developfrom
philipp/docs-fix-strided-ops-prose
Jun 3, 2026
Merged

docs: correct grammar in descriptions#12461
kgryte merged 1 commit into
developfrom
philipp/docs-fix-strided-ops-prose

Conversation

@Planeshifter
Copy link
Copy Markdown
Member

Description

What is the purpose of this pull request?

This pull request corrects copy-paste summary prose in the @stdlib/math/strided/ops/mul and @stdlib/math/strided/ops/sub packages. Both reused the add package's preposition "to" ("...each element in a strided array x to a corresponding element in a strided array y"), which is wrong for these operations:

  • mul computes z = x * y → "...x by a corresponding element...".
  • sub computes z = x - y → "Subtracts each element in a strided array y from a corresponding element in a strided array x...".

The element-wise math in the examples was already correct; only the prose was stale. The wording is corrected across each package's doc surfaces (declaration TSDoc, README, REPL help, and lib JSDoc summaries).

While here, two stale sub README example output annotations are corrected, where a -10.0 result was shown as 0.0.

The math/strided/ops namespace aggregator carries the same summary text but is generated and will pick up the fix on regeneration.

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?

Found via a TypeScript-declaration audit of the @stdlib/math namespace.

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.

These issues were identified by an automated TypeScript-declaration audit run with Claude Code, and the fixes were prepared by Claude Code under my review.


@stdlib-js/reviewers

The `mul` and `sub` summaries reused the `add` package's preposition
"to" ("...each element in a strided array `x` to a corresponding
element in a strided array `y`"), which is wrong for these operations:

- `mul` computes `z = x * y`, so the summary should read "...`x` by a
  corresponding element...".
- `sub` computes `z = x - y`, so the summary should read "Subtracts
  each element in a strided array `y` from a corresponding element in a
  strided array `x`..." (i.e. subtract `y` from `x`).

The element-wise math in the examples was already correct; only the
prose was stale. Correct the wording across each package's doc surfaces
(declaration TSDoc, README, REPL help, and `lib` JSDoc summaries).

While here, also correct two stale `sub` README example output
annotations where a `-10.0` result was shown as `0.0`.

The `math/strided/ops` namespace aggregator carries the same summary
text but is generated and will pick up the fix on regeneration.

---
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: passed
  - 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: 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
---
@stdlib-bot stdlib-bot added the Math Issue or pull request specific to math functionality. label Jun 2, 2026
@stdlib-bot
Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
math/strided/ops/mul $\color{green}582/582$
$\color{green}+100.00\%$
$\color{green}13/13$
$\color{green}+100.00\%$
$\color{green}2/2$
$\color{green}+100.00\%$
$\color{green}582/582$
$\color{green}+100.00\%$
math/strided/ops/sub $\color{green}582/582$
$\color{green}+100.00\%$
$\color{green}13/13$
$\color{green}+100.00\%$
$\color{green}2/2$
$\color{green}+100.00\%$
$\color{green}582/582$
$\color{green}+100.00\%$

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

@Planeshifter Planeshifter marked this pull request as ready for review June 3, 2026 00:11
@Planeshifter Planeshifter requested review from a team and kgryte June 3, 2026 00:11
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Jun 3, 2026
@kgryte kgryte removed the Needs Review A pull request which needs code review. label Jun 3, 2026
@kgryte kgryte added the Documentation Improvements, additions, or changes to documentation. label Jun 3, 2026
@kgryte kgryte changed the title docs: correct element-wise op summaries in math/strided/ops/{mul,sub} docs: correct grammar in descriptions Jun 3, 2026
@kgryte kgryte merged commit 381ed21 into develop Jun 3, 2026
73 checks passed
@kgryte kgryte deleted the philipp/docs-fix-strided-ops-prose branch June 3, 2026 01:32
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. Math Issue or pull request specific to math functionality.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants