Skip to content

docs: fix JSDoc parameter types in lapack/base/iladlc and lapack/base/iladlr - #16220

Merged
kgryte merged 2 commits into
developfrom
claude/cool-johnson-l48m3a
Oct 24, 2026
Merged

kgryte merged 2 commits into
developfrom
claude/cool-johnson-l48m3a

Conversation

@Planeshifter

Copy link
Copy Markdown
Member

Description

What is the purpose of this pull request?

This pull request:

  • fixes JSDoc parameter types in lapack/base/iladlc and lapack/base/iladlr so that they match their implementations and the conventions used across lapack/base.

lapack/base/iladlc

Retypes LDA from integer to PositiveInteger in lib/iladlc.js. The LDA < max(1,s) guard already enforces this, and 15 of the 17 packages with a leading-dimension parameter (88%) use the same type. Retypes M and N from PositiveInteger to NonNegativeInteger in lib/iladlc.js, lib/ndarray.js, and lib/base.js. Empty matrices return -1 and the tests cover M = 0 and N = 0; 11 of the 13 matrix routines (85%) use NonNegativeInteger.

lapack/base/iladlr

Same corrections as iladlc: LDA becomes PositiveInteger in lib/iladlr.js (88%), and M/N become NonNegativeInteger in lib/iladlr.js, lib/ndarray.js, and lib/base.js (85%). The empty-matrix early return in lib/base.js and the tests at test/test.iladlr.js already allow zero dimensions.

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.

These corrections came from a cross-package consistency check of lapack/base.

Namespace summary. 34 members, with no autogenerated packages. Structural features analyzed: file tree, package.json keys, manifest.json keys, and README sections. Semantic features analyzed: public signature, validation prologue, error construction, JSDoc shape, and dependencies. Features with a clear majority (≥75%) included the core file tree (85%), README sections, leading-dimension parameter types (88%), M/N parameter types in matrix routines (85%), and leading-dimension validation in BLAS-style APIs (87%). Error construction (59% format, the rest throw nothing) and return kind had no clear majority and were excluded.

Validation. Every package was checked for both structural and semantic features, and each candidate correction was then reviewed by three agents (semantic intent, cross-reference against tests and docs, structural applicability). Only JSDoc changes survived. The following were deliberately left out:

  • Missing ndarray APIs and benchmarks in the scalar routines (disnan, dlaisnan, dlamch, dlapy2, dlapy3) and in the C-support packages (shared, xerbla). These are intentional.
  • Missing leading-dimension RangeError checks in dge-trans and sge-trans. Adding them would change observable behavior and needs a decision on the bound for the transposed output.
  • The README C APIs placeholder sections. Only 32% of stdlib READMEs have one.

docs/repl.txt and docs/types/index.d.ts are unchanged; they already match the majority wording.

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 primarily by Claude Code as part of an automated cross-package consistency check.


@stdlib-js/reviewers


Generated by Claude Code

Type `LDA` as `PositiveInteger` in lib/iladlc.js, matching the
`LDA < max(1,s)` RangeError guard and the leading-dimension
convention used in 15/17 (88%) sibling packages.

Type `M` and `N` as `NonNegativeInteger` in lib/iladlc.js,
lib/ndarray.js, and lib/base.js. The implementation returns `-1`
for empty matrices and tests exercise `M = 0` and `N = 0`;
matches 11/13 (85%) sibling matrix routines.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P7vVhbw1EERFwQJuyT1rh8
Type `LDA` as `PositiveInteger` in lib/iladlr.js, matching the
`LDA < max(1,s)` RangeError guard and the leading-dimension
convention used in 15/17 (88%) sibling packages.

Type `M` and `N` as `NonNegativeInteger` in lib/iladlr.js,
lib/ndarray.js, and lib/base.js. The implementation returns `-1`
for empty matrices and tests exercise `M = 0` and `N = 0`;
matches 11/13 (85%) sibling matrix routines.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01P7vVhbw1EERFwQJuyT1rh8
@stdlib-bot stdlib-bot added the LAPACK Issue or pull request related to the Linear Algebra Package (LAPACK). label Oct 18, 2026
@stdlib-bot

Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
lapack/base/iladlc $\\color{green}304/304$
$\\color{green}+100.00\\%$
$\\color{green}20/20$
$\\color{green}+100.00\\%$
$\\color{green}3/3$
$\\color{green}+100.00\\%$
$\\color{green}304/304$
$\\color{green}+100.00\\%$
lapack/base/iladlr $\\color{red}375/377$
$\\color{green}+99.47\\%$
$\\color{red}36/37$
$\\color{green}+97.30\\%$
$\\color{green}3/3$
$\\color{green}+100.00\\%$
$\\color{red}375/377$
$\\color{green}+99.47\\%$

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

@kgryte kgryte added the Documentation Improvements, additions, or changes to documentation. label Oct 24, 2026
@kgryte
kgryte marked this pull request as ready for review October 24, 2026 02:31
@kgryte
kgryte requested a review from a team October 24, 2026 02:31
@kgryte
kgryte merged commit 28a3ebe into develop Oct 24, 2026
50 checks passed
@kgryte
kgryte deleted the claude/cool-johnson-l48m3a branch October 24, 2026 02:32
@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 Oct 24, 2026
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. LAPACK Issue or pull request related to the Linear Algebra Package (LAPACK).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants