Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

implement reverse #116

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open

Conversation

BruceDai
Copy link
Contributor

This PR is to fixe #110.

@fdwr @huningxin @shiyi9801 PTAL, thanks!

Copy link

@fdwr fdwr left a comment

Choose a reason for hiding this comment

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

One comment, then LGTM Bruce.

src/reverse.js Outdated
*/
export function reverse(input, {axes}) {
// reuse validateReduceParams to check parameters of reverse
validateReduceParams(input, {axes});
Copy link

@fdwr fdwr Dec 16, 2024

Choose a reason for hiding this comment

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

If reverse had been added before reduce, would reduce call validateReverseParams? Renaming validateReduceParams to a more generic validateAxes would make sense.

@@ -471,7 +471,10 @@ export function validatePool2dParams(input, _, {roundingType = 'floor'}) {
}
}

export function validateReduceParams(input, {axes}) {
export function validateAxes(input, {axes}) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Given the renaming, should it just take axes argument rather than an object containing axes attribute?

Copy link

@fdwr fdwr left a comment

Choose a reason for hiding this comment

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

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants