{{ message }}
Repository navigation
fix(blas/ext/circshift): require zero-dimensional k without dims - #16035
Closed
Planeshifter wants to merge 1 commit into
Closed
Planeshifter wants to merge 1 commit into
Planeshifter wants to merge 1 commit into
Conversation
The scheduled `macos_test` (Node.js v16) and `linux_test` workflows on
develop fail in `blas/ext/circshift/test/test.js`: calling
`circshift( x, k )` or `circshift( x, k, {} )` with an ndarray `k` of
shape [4], [2,2,2], or [0] does not throw.
Without a `dims` option, the operation is performed across all
dimensions, so no loop dimensions remain and the underlying strided
dispatcher never validates the shape of `k`. The README requires `k` to
be zero-dimensional in this case, but `main.js` passed it through
unchecked. This commit validates `ndims( k )` in both code paths and
throws a `TypeError`, matching `blas/ext/cusome`.
Ref: https://github.com/stdlib-js/stdlib/actions/runs/38040801198
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EDi1Vzz6ELK1xpm9bp5Kqv
Contributor
Member
|
Isn't this a duplicate? |
Member
Author
|
@kgryte Not that I can find. If you're thinking of a PR that fixes this elsewhere (e.g., in Generated by Claude Code |
Member
|
You need to look further back than the last 100 PRs. |
Member
Author
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.

Description
This pull request:
macos_testandlinux_testfailures ondevelopinblas/ext/circshift. Without adimsoption,circshiftnow throws aTypeErrorwhenkis an ndarray which is not zero-dimensional, matchingblas/ext/cusomeand the documented contract.Failing run: https://github.com/stdlib-js/stdlib/actions/runs/38040801198
Symptom: six assertions in
blas/ext/circshift/test/test.jsfail, ascircshift( x, k )andcircshift( x, k, {} )do not throw forkof shape[4],[2,2,2], and[0]with a[2,2]input.Root cause: with no
dims, all dimensions are core dimensions, so no loop dimensions remain and the strided dispatcher never validates the shape ofk.main.jspassedkthrough unchecked.Fix: check
ndims( k )in both no-dimspaths (circshift( x, k )andcircshift( x, k, opts )). Behavior withdims, with scalark, and with zero-dimensionalkis unchanged.Related Issues
This pull request has the following related issues:
Questions
No.
Other
Validation:
circshift/test/test.jspasses locally (270/270, previously 264/270) and the package example runs. Three independent reviews (correctness, regression scope, style) approved; no blocking findings.Reviewer notes (non-blocking): the new
TypeErroris not listed in the@throwsJSDoc, consistent withcusome. Adding it to both packages could be done separately.The macOS job also runs under Node.js v16, but the failure reproduces on current Node.js, so it is not version-specific.
Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
This PR was authored by Claude Code as part of an automated CI-failure triage routine. Claude identified the failing job, root-caused the failure, and wrote the fix; three Claude-based reviewers validated it. A maintainer has not yet reviewed it.
@stdlib-js/reviewers
🤖 Generated with Claude Code
https://claude.ai/code/session_01EDi1Vzz6ELK1xpm9bp5Kqv
Generated by Claude Code