Skip to content

feat: add blas/ext/base/gzero-to#11191

Open
headlessNode wants to merge 3 commits intostdlib-js:developfrom
headlessNode:blas/gzero-to
Open

feat: add blas/ext/base/gzero-to#11191
headlessNode wants to merge 3 commits intostdlib-js:developfrom
headlessNode:blas/gzero-to

Conversation

@headlessNode
Copy link
Copy Markdown
Member

Resolves stdlib-js/metr-issue-tracker#229.

Description

What is the purpose of this pull request?

This pull request:

  • add blas/ext/base/gzero-to

Related Issues

Does this pull request have any related issues?

This pull request has the following related issues:

Questions

Any questions for reviewers of this pull request?

No.

Other

Any other information relevant to this pull request? This may include screenshots, references, and/or implementation notes.

No.

Checklist

Please ensure the following tasks are completed before submitting this pull request.

AI Assistance

When authoring the changes proposed in this PR, did you use any kind of 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

If you answered "yes" to using AI assistance, please provide a short disclosure indicating how you used AI assistance. This helps reviewers determine how much scrutiny to apply when reviewing your contribution. Example disclosures: "This PR was written primarily by Claude Code." or "I consulted ChatGPT to understand the codebase, but the proposed changes were fully authored manually by myself.".

Written primarily by Claude Code.


@stdlib-js/reviewers

@stdlib-bot stdlib-bot added the BLAS Issue or pull request related to Basic Linear Algebra Subprograms (BLAS). label Mar 28, 2026
@github-actions github-actions bot mentioned this pull request Mar 28, 2026
@stdlib-bot
Copy link
Copy Markdown
Contributor

stdlib-bot commented Mar 28, 2026

Coverage Report

Package Statements Branches Functions Lines
blas/ext/base/gzero-to $\color{green}247/247$
$\color{green}+0.00%$
$\color{green}15/15$
$\color{green}+0.00%$
$\color{green}3/3$
$\color{green}+0.00%$
$\color{green}247/247$
$\color{green}+0.00%$

The above coverage report was generated for the changes in this PR.

@headlessNode headlessNode added Feature Issue or pull request for adding a new feature. METR Pull request associated with the METR project. labels Mar 28, 2026
@headlessNode headlessNode marked this pull request as ready for review March 28, 2026 18:21
@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Mar 28, 2026
@headlessNode headlessNode requested a review from kgryte March 28, 2026 18:21
@kgryte kgryte removed the Needs Review A pull request which needs code review. label Mar 28, 2026
* gzeroTo( x.length, toAccessorArray( x ), 1 );
* // x => [ 0.0, 1.0, 2.0, 3.0 ]
*/
<T = unknown>( N: number, x: AccessorArrayLike<T>, strideX: number ): AccessorArrayLike<T>;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Study how we do things in

type InputArray<T> = Collection<T> | AccessorArrayLike<T>;
. What are you doing here with overloads is (1) unnecessary and (2) loses type specificity.

Comment on lines +29 to +30
gzeroTo( x.length, x, 1 ); // $ExpectType Collection<number>
gzeroTo( x.length, new AccessorArray( x ), 1 ); // $ExpectType AccessorArrayLike<number>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These need to be updated.

Comment on lines +87 to +88
gzeroTo.ndarray( x.length, x, 1, 0 ); // $ExpectType Collection<number>
gzeroTo.ndarray( x.length, new AccessorArray( x ), 1, 0 ); // $ExpectType AccessorArrayLike<number>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These need to be updated.

Signed-off-by: Athan <kgryte@gmail.com>
Co-authored-by: Athan <kgryte@gmail.com>
Signed-off-by: Athan <kgryte@gmail.com>
Copy link
Copy Markdown
Member

@kgryte kgryte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Apart from the TS declarations, this is now looking good.

@kgryte kgryte added the Needs Changes Pull request which needs changes before being merged. label Mar 28, 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). Feature Issue or pull request for adding a new feature. METR Pull request associated with the METR project. Needs Changes Pull request which needs changes before being merged.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[RFC]: feat: add blas/ext/base/gzero-to

3 participants