feat: add blas/ext/base/greplicate#11303
Open
headlessNode wants to merge 1 commit intostdlib-js:developfrom
Open
feat: add blas/ext/base/greplicate#11303headlessNode wants to merge 1 commit intostdlib-js:developfrom
blas/ext/base/greplicate#11303headlessNode wants to merge 1 commit intostdlib-js:developfrom
Conversation
Contributor
Coverage Report
The above coverage report was generated for the changes in this PR. |
kgryte
reviewed
Apr 5, 2026
| /** | ||
| * Input array. | ||
| */ | ||
| type InputArray = Collection<number> | AccessorArrayLike<number>; |
Member
There was a problem hiding this comment.
Why are we restricting strided array elements to number?
Suggested change
| type InputArray = Collection<number> | AccessorArrayLike<number>; | |
| type InputArray<T> = Collection<T> | AccessorArrayLike<T>; |
kgryte
reviewed
Apr 5, 2026
| /** | ||
| * Output array. | ||
| */ | ||
| type OutputArray = Collection<number> | AccessorArrayLike<number>; |
Member
There was a problem hiding this comment.
Suggested change
| type OutputArray = Collection<number> | AccessorArrayLike<number>; | |
| type OutputArray<T> = Collection<T> | AccessorArrayLike<T>; |
kgryte
reviewed
Apr 5, 2026
| * greplicate( x.length, 2, x, 1, out, 1 ); | ||
| * // out => [ 1.0, 1.0, 2.0, 2.0, 3.0, 3.0 ] | ||
| */ | ||
| <T extends OutputArray>( N: number, k: number, x: InputArray, strideX: number, out: T, strideOut: number ): T; |
Member
There was a problem hiding this comment.
Suggested change
| <T extends OutputArray>( N: number, k: number, x: InputArray, strideX: number, out: T, strideOut: number ): T; | |
| <T = unknown, U extends InputArray<T> = InputArray<T>, V extends OutputArray<T> = OutputArray<T>>( N: number, k: number, x: U, strideX: number, out: V, strideOut: number ): V; |
kgryte
reviewed
Apr 5, 2026
| * var x = [ 1.0, 2.0, 3.0 ]; | ||
| * var out = [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ]; | ||
| * | ||
| * greplicate.ndarray( 3, 2, x, 1, 0, out, 1, 0 ); |
Member
There was a problem hiding this comment.
Suggested change
| * greplicate.ndarray( 3, 2, x, 1, 0, out, 1, 0 ); | |
| * greplicate.ndarray( x.length, 2, x, 1, 0, out, 1, 0 ); |
kgryte
reviewed
Apr 5, 2026
| * Replicates each strided array element a specified number of times. | ||
| * | ||
| * @param {PositiveInteger} N - number of indexed elements | ||
| * @param {PositiveInteger} k - number of times to replicate |
Member
There was a problem hiding this comment.
Suggested change
| * @param {PositiveInteger} k - number of times to replicate | |
| * @param {PositiveInteger} k - number of times to replicate each element |
Applies here and elsewhere in this PR.
kgryte
reviewed
Apr 5, 2026
|
|
||
| // TESTS // | ||
|
|
||
| // The function returns a numeric array... |
Member
There was a problem hiding this comment.
This description needs to be updated.
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.
Resolves stdlib-js/metr-issue-tracker#249.
Description
This pull request:
blas/ext/base/greplicateRelated Issues
This pull request has the following related issues:
blas/ext/base/greplicatemetr-issue-tracker#249Questions
No.
Other
No.
Checklist
AI Assistance
If you answered "yes" above, how did you use AI assistance?
Disclosure
Primarily written by Claude Code.
@stdlib-js/reviewers