Repository navigation
fix: clamp only the upper bound and clean-up - #16108
Merged
Merged
Conversation
Propagates fix from dab2209 ("fix: clamp only the upper bound") to `dlast-index-equal` and `dlast-index-of-truthy`, which clamped a negative `fromIndex` whose magnitude exceeds the vector length to `0` and thus still searched the first element instead of returning `-1`. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EuwEAYSHY7ShHtD7EZrjcp
Propagates fix from b44ccd7 ("test: fix typos in descriptions") to sibling test files containing the same whitespace typos (missing space before a backticked identifier and doubled spaces) in `tape` descriptions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EuwEAYSHY7ShHtD7EZrjcp
Contributor
Coverage Report
The above coverage report was generated for the changes in this PR. |
kgryte
approved these changes
Oct 13, 2026
blas/ext/base/ndarray/dlast-index-*
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:
developbetween 2026-10-12 13:10 UTC and 2026-10-13 13:10 UTC to sibling packages.clipIndexmaps a negativefromIndexwith magnitude exceeding the vector length to0, so the first element is still searched and0may be returned instead of-1. Switches toclipUpperIndexwith an early-1return and updates the corresponding test assertion (0→-1), mirroring the source commit.blas/ext/base/ndarray/dlast-index-equalblas/ext/base/ndarray/dlast-index-of-truthytapedescriptions.stats/base/dists/gamma/quantile(test.quantile.js; the source only fixedtest.native.js)stats/array/mskrangestats/ranksstats/base/dists/weibull/logpdfstats/base/dists/weibull/pdfrandom/base/chirandom/base/chisquareblas/ext/base/gnancountiter/filter-mapassert/is-node-{stream,duplex-stream,readable-stream,transform-stream,writable-stream}-likeRelated Issues
No.
Questions
No.
Other
Validation. Sites were found by searching
blas/ext/base/ndarray/*last-index*for theclipIndexclamp and alltest*.jsfiles for whitespace typos intapedescriptions. Two independent reviewers confirmed every site, an adaptation pass checked that each patch applies verbatim within the target file, and a style pass checked that each patch matches the surrounding code. WithfromIndex = -100, bothdlast-index-*packages returned0before this change and now return-1. Their test suites pass after the change.Excluded.
arguments.lengthloop indexing.@returnsdescriptions.-0.0return annotations. All 513// returns 0.0/-0.0examples instats/base/distswere evaluated.random/base/minstd-shuffle"r`normalized`": a different typo shape.Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
This PR was written primarily by Claude Code as part of an automated fix-propagation routine.
🤖 Generated with Claude Code
https://claude.ai/code/session_01EuwEAYSHY7ShHtD7EZrjcp
Generated by Claude Code