Skip to content

refactor: align blas/ext/base/gcartesian-square JSDoc and accessor return with siblings#11988

Merged
kgryte merged 2 commits into
developfrom
philipp/fix-commit-review-2026-05-07
May 10, 2026
Merged

refactor: align blas/ext/base/gcartesian-square JSDoc and accessor return with siblings#11988
kgryte merged 2 commits into
developfrom
philipp/fix-commit-review-2026-05-07

Conversation

@Planeshifter
Copy link
Copy Markdown
Member

Follow-up fixes for commits merged to develop between 2026-05-06 14:57 -0400 and 2026-05-06 18:39 -0700 (SHA range 26286631e5293ab638, 22 first-parent commits).

Description

This pull request:

  • Aligns blas/ext/base/gcartesian-square with sibling strided routines in blas/ext/base.

blas/ext/base/gcartesian-square

  • Fixes a return-value inconsistency introduced in 0c3e5bd9e for blas/ext/base/gcartesian-square: accessors.js now returns out (not the underlying buffer obuf) with a corrected @returns {Object} output array object annotation, and ndarray.js invokes accessors(...) for its side effect and returns out directly, aligning behavior and docs with the sibling gcartesian-power package.
  • Fix incorrect {NonNegativeInteger} annotation on parameter N in blas/ext/base/gcartesian-square (introduced in 0c3e5bd9e), aligning with the {PositiveInteger} convention used across all sibling strided routines in blas/ext/base.

Related Issues

None.

Questions

No.

Other

Generated by an automated review of the 22 first-parent commits merged to develop in the preceding 24-hour window.

Validation performed:

  • stdlib code style guideline compliance (docs/style-guides/javascript, docs/style-guides/c).
  • Comparison against established sibling reference packages: gcartesian-power, gfill, gcusum, dwhere, swhere, zwhere.
  • Bug scan limited to the diff window itself (no out-of-window context required for any landed fix).
  • Re-read of every modified file post-edit to confirm fixes match the proposed change exactly.

Deliberately excluded:

  • Anything requiring interpretation of intent (e.g., the to-reversed-dimensions JSDoc-vs-error-message wording, where downstream reverseDimensions enforces the broader contract).
  • The "missing intro section" in the gcartesian-square README, which is consistent with every other cartesian-family sibling (gcartesian-power, dcartesian-power, scartesian-power, dcartesian-square, scartesian-square).
  • Subjective preferences and any change requiring edits outside the diff window.

Checklist

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 PR was authored by Claude Code as a follow-up review of commits merged to develop in the preceding 24 hours. Findings were validated against established sibling packages, and only high-signal issues with concrete, in-scope fixes were applied.



Generated by Claude Code

…urn with siblings

Annotate `N` as a `PositiveInteger` to match every sibling strided
routine (`gfill`, `gcusum`, `dwhere`, `swhere`, `gcartesian-power`),
and align the accessor branch with `gcartesian-power/lib/accessors.js`
by returning the original `out` collection (not the underlying buffer)
and updating the `@returns` annotation accordingly.
@stdlib-bot stdlib-bot added the BLAS Issue or pull request related to Basic Linear Algebra Subprograms (BLAS). label May 7, 2026
@stdlib-bot
Copy link
Copy Markdown
Contributor

stdlib-bot commented May 7, 2026

Coverage Report

No coverage information available.

…/base/gcartesian-square`

The implementation handles `N = 0` via the `if ( N <= 0 ) { return out; }` guard
in `ndarray.js`, and the cartesian-family siblings (`gcartesian-power`,
`dcartesian-square`, `scartesian-square`) all annotate `N` as `NonNegativeInteger`.

---
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
    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: 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: na
  - task: lint_license_headers
    status: passed
---
@Planeshifter Planeshifter changed the title style: align blas/ext/base/gcartesian-square JSDoc and accessor return with siblings refactor: align blas/ext/base/gcartesian-square JSDoc and accessor return with siblings May 10, 2026
@Planeshifter Planeshifter requested a review from kgryte May 10, 2026 21:21
@Planeshifter Planeshifter marked this pull request as ready for review May 10, 2026 21:21
@Planeshifter Planeshifter requested a review from a team May 10, 2026 21:21
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label May 10, 2026
@kgryte kgryte removed the Needs Review A pull request which needs code review. label May 10, 2026
@kgryte kgryte merged commit eed3993 into develop May 10, 2026
37 checks passed
@kgryte kgryte deleted the philipp/fix-commit-review-2026-05-07 branch May 10, 2026 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BLAS Issue or pull request related to Basic Linear Algebra Subprograms (BLAS).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants