Skip to content

Conversation

@headlessNode
Copy link
Member

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

Description

What is the purpose of this pull request?

This pull request:

  • add ndarray/base/ternary-loop-interchange-order

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.".

{{TODO: add disclosure if applicable}}


@stdlib-js/reviewers

@stdlib-bot stdlib-bot added the Needs Review A pull request which needs code review. label Jan 2, 2026
@headlessNode headlessNode added the Feature Issue or pull request for adding a new feature. label Jan 2, 2026
@stdlib-bot
Copy link
Contributor

stdlib-bot commented Jan 2, 2026

Coverage Report

Package Statements Branches Functions Lines
ndarray/base/ternary-loop-interchange-order $\color{green}150/150$
$\color{green}+0.00%$
$\color{green}3/3$
$\color{green}+0.00%$
$\color{green}1/1$
$\color{green}+0.00%$
$\color{green}150/150$
$\color{green}+0.00%$

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

@headlessNode headlessNode requested a review from kgryte January 2, 2026 11:41
@kgryte kgryte removed the Needs Review A pull request which needs code review. label Jan 3, 2026
Signed-off-by: Athan <[email protected]>
Copy link
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.

Overall, this looks okay. What I will say is that it is a bit odd to have w as the first array argument. That isn't the practice anywhere else in the codebase. Consider: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/array/base/quaternary2d

And given that we have been consistent with using x as the first array argument for unary and binary, it seems off to then make x the second array argument.

This also applies to ternary-tiling-block-size, where I had similar qualms.

@kgryte
Copy link
Member

kgryte commented Jan 3, 2026

Same thing in strided/base/ternary: https://github.com/stdlib-js/stdlib/tree/develop/lib/node_modules/%40stdlib/strided/base/ternary. Notice that w is the fourth array, not the first array.

Lastly, we typically do x, y, z, w, u, v in TS declarations.

I will go ahead and merge this and fix this up on my end. But for the future, please do a bit of R&D beforehand to see what the common conventions are elsewhere in the project.

@kgryte kgryte merged commit f40ccb7 into stdlib-js:develop Jan 3, 2026
13 checks passed
@headlessNode headlessNode deleted the ter-lio branch January 4, 2026 07:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Feature Issue or pull request for adding a new feature.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[RFC]: add ndarray/base/ternary-loop-interchange-order

3 participants