Skip to content

chore: correct keyword and JSDoc @returns type in ml/base/kmeans#12867

Draft
Planeshifter wants to merge 2 commits into
developfrom
claude/practical-goodall-softy2
Draft

chore: correct keyword and JSDoc @returns type in ml/base/kmeans#12867
Planeshifter wants to merge 2 commits into
developfrom
claude/practical-goodall-softy2

Conversation

@Planeshifter

Copy link
Copy Markdown
Member

Description

What is the purpose of this pull request?

This pull request:

  • Normalizes two cross-package drift findings in the ml/base/kmeans namespace surfaced by a structural+semantic diff against sibling packages.

ml/base/kmeans/algorithms

Replaces the plural algorithms topic keyword in package.json with the singular algorithm. Every other algorithm-family package (algorithm-enum2str, algorithm-str2enum, algorithm-resolve-enum, algorithm-resolve-str) tags itself with the singular algorithm, and the parallel metric-* family is uniformly singular as well. Singular topic-keyword conformance across the namespace: 9/10 (90%).

ml/base/kmeans/metrics

Replaces @returns {StringArray} with @returns {Array<string>} in lib/main.js. The package's own docs/types/index.d.ts already declares Array<string>, and docs/repl.txt reports out: Array<string>. The sibling ml/base/kmeans/algorithms JSDoc also uses Array<string>. The StringArray form in metrics/lib/main.js was the lone outlier across these five doc surfaces.

No observable behavior, signatures, or test expectations change.

Related Issues

Does this pull request have any related issues?

This pull request has the following 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.

Findings sourced from a cross-package structural and semantic diff of the ten packages in ml/base/kmeans/. Other candidates inspected and deliberately excluded: the Notes README section (semantically warranted only in str2enum/resolve-enum packages whose output is an opaque integer); the C APIs section (semantically warranted only in the two C-binding packages); and any signature/validation differences between the algorithm-* and metric-* families (legitimate semantic mirroring, not drift).

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

This PR was written by Claude Code as part of a cross-package drift detection routine over the ml/base/kmeans namespace.


@stdlib-js/reviewers


Generated by Claude Code

claude added 2 commits June 14, 2026 04:12
Replace plural `algorithms` topic keyword with singular `algorithm` to
match the convention used by the four sibling `algorithm-*` packages
and by every package in the parallel `metric-*` family (9/10 packages
in the namespace use the singular topic-keyword form).
Replace `{StringArray}` with `{Array<string>}` so the JSDoc matches
this package's own TypeScript declaration and REPL signature
(`Array<string>`), as well as the JSDoc on the parallel
`ml/base/kmeans/algorithms` package.
@stdlib-bot

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
ml/base/kmeans/algorithms $\\color{green}142/142$
$\\color{green}+100.00\\%$
$\\color{green}5/5$
$\\color{green}+100.00\\%$
$\\color{green}2/2$
$\\color{green}+100.00\\%$
$\\color{green}142/142$
$\\color{green}+100.00\\%$
ml/base/kmeans/metrics $\\color{green}148/148$
$\\color{green}+100.00\\%$
$\\color{green}5/5$
$\\color{green}+100.00\\%$
$\\color{green}2/2$
$\\color{green}+100.00\\%$
$\\color{green}148/148$
$\\color{green}+100.00\\%$

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

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.

3 participants