Skip to content

docs: update examples - #14169

Merged
kgryte merged 2 commits into
developfrom
claude/ecstatic-heisenberg-2y2jpw
Aug 12, 2026
Merged

docs: update examples#14169
kgryte merged 2 commits into
developfrom
claude/ecstatic-heisenberg-2y2jpw

Conversation

@Planeshifter

Copy link
Copy Markdown
Member

Description

Propagating fixes merged to develop between 2026-08-10 13:50 PDT (44cb452) and 2026-08-10 18:02 PDT (e45106f) to sibling packages carrying the same defects.

Pattern: missing f suffix on single-precision float literals in C examples

float-typed C example code needs f-suffixed literals; unsuffixed literals are double and trigger implicit-narrowing warnings under strict compilers. Source commit fixed this in blas/ext/base/ccopy-within's README and examples/c/example.c; the same defect was propagated to two further packages, including one spot where the alpha argument diverged from that package's own already-correct example file.

  • 362ed235 (chore: clean-up)
    • blas/base/ssyr (README Usage and Examples C blocks: 4 array-initializer lines, 3 const float alpha arguments)
    • blas/ext/base/swxsy (README Usage and Examples C blocks: 9 array-initializer lines)

Pattern: @example object-literal indentation in .d.ts docs

Object-literal members inside @example blocks must carry a 5-space indent after the leading * (1-space JSDoc gutter + 4-space code indent), not 4. 362ed235 fixed this in four blas/ext/base/ndarray/*triu packages but missed the sibling dtriu package and seventeen other blas/ext/base/ndarray packages sharing the same scalar2ndarray( 0, { … }) example pattern — 27 lines total. In slinspace, glinspace, and dlinspace, the third object literal in the same example is already correctly indented, leaving those three files internally inconsistent.

  • 362ed235 (chore: clean-up)
    • blas/ext/base/ndarray/dtriu (missed by source commit; 1 line)
    • blas/ext/base/ndarray/scopy-within (4 lines)
    • blas/ext/base/ndarray/dcopy-within (4 lines)
    • blas/ext/base/ndarray/slinspace (2 lines)
    • blas/ext/base/ndarray/glinspace (2 lines)
    • blas/ext/base/ndarray/dlinspace (2 lines)
    • blas/ext/base/ndarray/ssorthp (1 line)
    • blas/ext/base/ndarray/ssort (1 line)
    • blas/ext/base/ndarray/scircshift (1 line)
    • blas/ext/base/ndarray/gsorthp (1 line)
    • blas/ext/base/ndarray/gsort (1 line)
    • blas/ext/base/ndarray/gcopy-within (1 line)
    • blas/ext/base/ndarray/gcircshift (1 line)
    • blas/ext/base/ndarray/dsortsh (1 line)
    • blas/ext/base/ndarray/dsortins (1 line)
    • blas/ext/base/ndarray/dsorthp (1 line)
    • blas/ext/base/ndarray/dsort (1 line)
    • blas/ext/base/ndarray/dcircshift (1 line)

Related Issues

No.

Questions

No.

Other

Validation

  • Search scope. For the float-literal pattern: repo-wide script scan of float <name>[] = { … } initializers containing unsuffixed literals in README ```c blocks and examples/c/*.c (168 lines in 63 files), scoped for this run to the source commit's `blas/` namespace. For the indentation pattern: repo-wide `rg` for asterisk-plus-4-spaces-plus-quote in `docs/types/index.d.ts` JSDoc, scoped to `blas/ext/base/ndarray/` siblings.
  • Two independent Opus validation agents read every candidate file in full and confirmed each site; an adaptation pass produced exact before/after lines per site; a style-consistency pass verified conventions against post-fix ccopy-within, ctriu, sibling ssyr2/sspr READMEs, and each package's own examples/c/example.c. All 43 lines were confirmed by all agents; zero sites were rejected or flagged needs-human.
  • Every other fix-shaped commit in the window was checked for propagatable patterns and came up empty: the copyWithin benchmark fixes (e805b48, 35f9d71, 3fdf0b9, 075283f) fixed all affected files at source; the mymgfmgf example fix (fc38da1) has no analog anywhere (script-verified across all @example/README/repl.txt blocks); the VLA → malloc and Pareto (Type I) parameter-description fixes (ccc3c46) have no remaining sites.

Deliberately excluded:

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 on behalf of @Planeshifter as an automated propagation of fixes merged to develop over the prior 24 hours. Candidate source commits were filtered for generalizable patterns, sibling sites located via grep-able pattern signatures, and each proposed patch independently validated by parallel reviewer agents before commits were applied. A maintainer should audit and promote out of draft.


🤖 Generated with Claude Code

https://claude.ai/code/session_01MBunG53uJwaC8GwkyTUAyn


Generated by Claude Code

Propagates fixes from 362ed23 ("chore: clean-up") to sibling packages
carrying the same defects: adds missing `f` suffixes to single-precision
floating-point literals in the README C code blocks of `blas/base/ssyr`
and `blas/ext/base/swxsy`, and fixes JSDoc example indentation in the
TypeScript declarations of eighteen `blas/ext/base/ndarray` packages.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MBunG53uJwaC8GwkyTUAyn
@stdlib-bot stdlib-bot added the BLAS Issue or pull request related to Basic Linear Algebra Subprograms (BLAS). label Aug 11, 2026

Copy link
Copy Markdown
Member Author

CI red on Run affected tests: pre-existing failure on the base branch, not introduced by this PR (the diff here is documentation-only — README C code blocks and .d.ts JSDoc whitespace).

Root cause: blas/base/ndarray/ssyr/test/test.js passes resolveEnum( 'upper' ) (CBLAS enum 121) via a zero-dimensional int32 ndarray. The JS implementation blas/base/ssyr/lib/ndarray.js resolves uplo with matrix-triangle-resolve-str, which accepts both strings and enum integers — but ndarray.native.js validates with assert-is-matrix-triangle, which accepts strings only, so the native path throws TypeError: … Value: 121``. The test only exercises the native path when the add-on is built; touching ssyr's README marked the package affected, which built the add-on and surfaced the latent divergence. `ssyr.native.js`, and `dsyr`'s `dsyr.native.js`/`ndarray.native.js`, carry the same string-only validation while their JS counterparts use `resolveStr`.

Fixing the JS/native validation divergence is a runtime change outside this propagation PR's scope; it needs its own fix (align the *.native.js wrappers on resolveStr, or make blas/base/ndarray/ssyr pass the resolved string). Will re-run CI when the base recovers.


Generated by Claude Code

@stdlib-bot

stdlib-bot commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Coverage Report

No coverage information available.

@Planeshifter
Planeshifter requested a review from kgryte August 11, 2026 13:47
@Planeshifter
Planeshifter marked this pull request as ready for review August 11, 2026 13:47
@Planeshifter
Planeshifter requested a review from a team August 11, 2026 13:47
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Aug 11, 2026
@kgryte kgryte changed the title chore: propagate recent develop fixes to sibling packages (2026-08-11) docs: update examples Aug 12, 2026
@kgryte
kgryte merged commit cb9723a into develop Aug 12, 2026
14 checks passed
@kgryte
kgryte deleted the claude/ecstatic-heisenberg-2y2jpw branch August 12, 2026 00:26
@kgryte kgryte added Documentation Improvements, additions, or changes to documentation. and removed Needs Review A pull request which needs code review. labels Aug 12, 2026
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). Documentation Improvements, additions, or changes to documentation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants