Skip to content

chore: propagate blas/base/ndarray/* modernization fixes to sibling packages#11742

Merged
kgryte merged 2 commits intodevelopfrom
philipp/fix-propagation-2026-04-23
Apr 23, 2026
Merged

chore: propagate blas/base/ndarray/* modernization fixes to sibling packages#11742
kgryte merged 2 commits intodevelopfrom
philipp/fix-propagation-2026-04-23

Conversation

@Planeshifter
Copy link
Copy Markdown
Member

Propagating fixes merged to develop between 2026-04-22 17:30 PDT and 2026-04-23 03:05 PDT to sibling packages.

Description

This pull request:

  • Propagates two independent mechanical fixes identified across the chore: modernize examples and benchmarks series (16 commits on 2026-04-22/23, representative SHA 1f183560) and the chore: follow-up fixes commit (40db61db) to the sibling packages the source commits did not reach.

blas/base/ndarray/* README identity-check form (eb98b400)

Propagates the ( z === y ) identity-check form introduced in 1f183560 to the five remaining output-ndarray README examples that still use the var bool = ( y === z ); pattern. Affected packages: blas/base/ndarray/caxpy, blas/base/ndarray/zaxpy, blas/base/ndarray/ccopy, blas/base/ndarray/zcopy, and blas/base/ndarray/dswap. Purely mechanical one-line edits with no behavioral changes.

  • lib/node_modules/@stdlib/blas/base/ndarray/caxpy/README.md
  • lib/node_modules/@stdlib/blas/base/ndarray/zaxpy/README.md
  • lib/node_modules/@stdlib/blas/base/ndarray/ccopy/README.md
  • lib/node_modules/@stdlib/blas/base/ndarray/zcopy/README.md
  • lib/node_modules/@stdlib/blas/base/ndarray/dswap/README.md

blas/base/ndarray/*axpy scalar2ndarray test modernization (03235e5c)

Propagates the modernization from commit 1f183560 to the test/test.js files missed in the original series: blas/base/ndarray/{daxpy,saxpy,caxpy,zaxpy,gaxpy}/test/test.js. Each file is updated to import scalar2ndarray from ndarray/from-scalar (top-level) instead of the deprecated ndarray/base/from-scalar, and to call it with the options-object form scalar2ndarray( val, { 'dtype': '...' } ) matching the dtype used by the respective package. Behavior is preserved because ndarray/from-scalar defaults to row-major order and alpha is consumed as an ndarray throughout.

  • lib/node_modules/@stdlib/blas/base/ndarray/daxpy/test/test.js (float64)
  • lib/node_modules/@stdlib/blas/base/ndarray/saxpy/test/test.js (float32)
  • lib/node_modules/@stdlib/blas/base/ndarray/caxpy/test/test.js (complex64)
  • lib/node_modules/@stdlib/blas/base/ndarray/zaxpy/test/test.js (complex128)
  • lib/node_modules/@stdlib/blas/base/ndarray/gaxpy/test/test.js (generic)

Related Issues

No.

Questions

No.

Other

Validation

  • Pattern search scoped to blas/base/ndarray/* siblings under the source commits' namespace; no wider sweep.
  • Two independent opus validation agents each confirmed every target site has the defect and the source-commit fix applies. No needs-human flags.
  • Adaptation agent confirmed self-containment: no package.json updates required (the modernized module is already transitively present via each package's examples/index.js and benchmark/benchmark.js).
  • Sonnet style-consistency agent matched the multi-line options-object form ({\n\t\t'dtype': '...'\n\t}) against modernized sibling tests (blas/ext/base/ndarray/dsort, dsortins, dsorthp) and confirmed the README ( z === y ) wording matches scopy, dcopy, daxpy, saxpy.
  • Syntax check (node --check) passed on all five modernized test files.

Deliberately excluded

  • The broader "modernize ndarray construction via @stdlib/ndarray/vector/<dtype> instead of @stdlib/ndarray/base/ctor" pattern (1,250+ hits repo-wide, 5,700+ hits for the companion @stdlib/random/array/* pattern). These are adaptive transformations whose per-site tailoring (complex vs. float buffers, REPL alias rewrites, docs type signatures) is outside the "direct analog, self-contained" bar for this run.
  • The stale /* eslint-disable space-in-parens */ directive removed by 40db61db: cosmetic-only, not user-visible, excluded per the HIGH-SIGNAL filter.
  • Sites where cross-package changes would be needed.

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 part of an automated fix-propagation routine. Source-commit pattern extraction, candidate-site enumeration, independent validation, and style-consistency review were all run as sub-agent passes; every proposed patch was cross-verified by two independent opus agents before being applied. A human maintainer will audit before promotion out of draft.



Generated by Claude Code

claude added 2 commits April 23, 2026 13:34
Propagates fix from 1f18356 ("chore: modernize examples and benchmarks")
to the complex and swap sibling packages whose README examples still
wrote the output-ndarray identity check as `( y === z )` instead of the
canonical `( z === y )` form used across modernized siblings (daxpy,
saxpy, dcopy, scopy, ...).
Propagates modernization from 1f18356 ("chore: modernize examples and
benchmarks") to the axpy tests that still imported `scalar2ndarray` from
the deprecated `@stdlib/ndarray/base/from-scalar` path and called it
with positional arguments. Each package's `lib/main.js` already uses the
modern `@stdlib/ndarray/from-scalar` with the options-object form; the
tests are brought in line with them.
@stdlib-bot stdlib-bot added the BLAS Issue or pull request related to Basic Linear Algebra Subprograms (BLAS). label Apr 23, 2026
@stdlib-bot
Copy link
Copy Markdown
Contributor

Coverage Report

Package Statements Branches Functions Lines
blas/base/ndarray/caxpy $\color{green}121/121$
$\color{green}+100.00%$
$\color{green}3/3$
$\color{green}+100.00%$
$\color{green}1/1$
$\color{green}+100.00%$
$\color{green}121/121$
$\color{green}+100.00%$
blas/base/ndarray/ccopy $\color{green}107/107$
$\color{green}+100.00%$
$\color{green}3/3$
$\color{green}+100.00%$
$\color{green}1/1$
$\color{green}+100.00%$
$\color{green}107/107$
$\color{green}+100.00%$
blas/base/ndarray/daxpy $\color{green}119/119$
$\color{green}+100.00%$
$\color{green}3/3$
$\color{green}+100.00%$
$\color{green}1/1$
$\color{green}+100.00%$
$\color{green}119/119$
$\color{green}+100.00%$
blas/base/ndarray/dswap $\color{green}117/117$
$\color{green}+100.00%$
$\color{green}3/3$
$\color{green}+100.00%$
$\color{green}1/1$
$\color{green}+100.00%$
$\color{green}117/117$
$\color{green}+100.00%$
blas/base/ndarray/gaxpy $\color{green}119/119$
$\color{green}+100.00%$
$\color{green}3/3$
$\color{green}+100.00%$
$\color{green}1/1$
$\color{green}+100.00%$
$\color{green}119/119$
$\color{green}+100.00%$
blas/base/ndarray/saxpy $\color{green}119/119$
$\color{green}+100.00%$
$\color{green}3/3$
$\color{green}+100.00%$
$\color{green}1/1$
$\color{green}+100.00%$
$\color{green}119/119$
$\color{green}+100.00%$
blas/base/ndarray/zaxpy $\color{green}121/121$
$\color{green}+100.00%$
$\color{green}3/3$
$\color{green}+100.00%$
$\color{green}1/1$
$\color{green}+100.00%$
$\color{green}121/121$
$\color{green}+100.00%$
blas/base/ndarray/zcopy $\color{green}107/107$
$\color{green}+100.00%$
$\color{green}3/3$
$\color{green}+100.00%$
$\color{green}1/1$
$\color{green}+100.00%$
$\color{green}107/107$
$\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 April 23, 2026 21:38
@Planeshifter Planeshifter requested review from a team and kgryte April 23, 2026 21:38
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Apr 23, 2026
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.

This change is not necessarily needed and was originally omitted on purpose as tests are a bit trickier to uniformly align, especially as we intentionally need lower level interfaces (e.g., for stride and offset manipulation). This change is harmless, however, so I will accept it and similar changes in this PR.

@kgryte kgryte removed the Needs Review A pull request which needs code review. label Apr 23, 2026
@kgryte kgryte merged commit 57e6e8b into develop Apr 23, 2026
56 checks passed
@kgryte kgryte deleted the philipp/fix-propagation-2026-04-23 branch April 23, 2026 22:19
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