Conversation
Implement triangular and trapezoidal matrix norms with JavaScript and native C interfaces, scaled Frobenius accumulation, independent LAPACK fixtures, indexed storage coverage and package documentation. Assisted-by: OpenAI Codex
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #14631.
Description
The accepted LAPACK implementation RFC lists
dlantr, which is currently missing. This PR adds JavaScript and C implementations of all four norms of double-precision triangular and trapezoidal matrices, including row-major/column-major storage, arbitrary ndarray strides and offsets, and an optional Node-API addon.Unit diagonal entries are never read; the unused triangle and padding are also ignored. Scaled Frobenius accumulation avoids unnecessary overflow and underflow, referenced NaNs propagate even alongside infinities, and infinity-norm workspace retains its explicit size/stride requirements. The JavaScript interface uses four package-local canonical norm names and the adopted BLAS layout/triangle/diagonal options; the C API supports LAPACK character aliases. The numerical routine is self-contained and does not depend on an open DLASSQ refactor.
The package includes declarations, documentation, public headers, build manifests, examples, benchmarks and regression coverage. LAPACK adaptation provenance and its BSD redistribution terms are retained in
NOTICE; the SciPy fixture runner makes the independent oracle results reproducible.Related Issues
Validation
Questions
No.
Other
This implements one routine from the accepted RFC and does not close the whole tracking issue. No shared helper or dependency source is modified.
Checklist
AI Assistance
Yes
No
Code generation
Test/benchmark generation
Documentation (including examples)
Research and understanding
Disclosure
This contribution was authored primarily with OpenAI Codex. Codex generated the implementations, Node-API bridge, build metadata, tests, benchmarks and documentation; reviewed the LAPACK reference algorithm and license; generated and regenerated independent SciPy fixtures; and ran the recorded validation. A second Codex agent independently reviewed and exercised the numerical/native implementation. The contributing-guidelines acknowledgment records Codex's review and application of the guidelines under benatsf's explicit authorization to contribute. It does not claim that benatsf personally read the guide or manually reviewed the code. No manual applicant review is claimed.
@stdlib-js/reviewers