Skip to content

Use normalize_axis_tuple to normalize axis for all functions but expand_dims #1182

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

Merged
merged 3 commits into from
Apr 24, 2023

Conversation

oleksandr-pavlyk
Copy link
Contributor

Use normalize_axis_tuple to normalize axis for all but expand_dims functions

Closes gh-1178

Adds test to cover gh-1178.

  • Have you provided a meaningful PR description?
  • Have you added a test, reproducer or referred to an issue with a reproducer?
  • Have you tested your changes locally for CPU and GPU devices?
  • Have you made sure that new changes do not introduce compiler warnings?
  • Have you checked performance impact of proposed changes?
  • If this PR is a work in progress, are you opening the PR as a draft?

@coveralls
Copy link
Collaborator

Coverage Status

Coverage: 83.24% (-0.02%) from 83.263% when pulling 749d5e9 on fix-gh-1178 into 37497b2 on master.

@coveralls
Copy link
Collaborator

coveralls commented Apr 22, 2023

Coverage Status

Coverage: 83.317% (+0.05%) from 83.263% when pulling 80c6046 on fix-gh-1178 into 37497b2 on master.

@github-actions
Copy link

@github-actions
Copy link

Array API standard conformance tests for dpctl=0.14.3dev1=py310h76be34b_7 ran successfully.
Passed: 120
Failed: 887
Skipped: 109

Added tests to cover each property.
@github-actions
Copy link

Array API standard conformance tests for dpctl=0.14.3dev1=py310h76be34b_8 ran successfully.
Passed: 120
Failed: 887
Skipped: 109

Copy link
Collaborator

@antonwolfy antonwolfy left a comment

Choose a reason for hiding this comment

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

The example works now. Thank you @oleksandr-pavlyk !

@@ -1108,6 +987,7 @@ def test_moveaxis_new_position(source, destination, expected):
],
Copy link
Collaborator

Choose a reason for hiding this comment

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

Everything looks good to me.
If you want, you can add (range(4), range(4)), here and remove test_moveaxis_gh_1178 to have similar tests in one place.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I intended to add the new test case to test_moveaxis_preserve_order function (here) (in this case it was not necessary to add shape as input) but it is added below to test_moveaxis_move_multiples.

@github-actions
Copy link

Array API standard conformance tests for dpctl=0.14.3dev1=py310h76be34b_9 ran successfully.
Passed: 120
Failed: 887
Skipped: 109

1 similar comment
@github-actions
Copy link

Array API standard conformance tests for dpctl=0.14.3dev1=py310h76be34b_9 ran successfully.
Passed: 120
Failed: 887
Skipped: 109

@oleksandr-pavlyk oleksandr-pavlyk merged commit 4a2a79f into master Apr 24, 2023
@oleksandr-pavlyk oleksandr-pavlyk deleted the fix-gh-1178 branch April 24, 2023 19:17
@github-actions
Copy link

Deleted rendered PR docs from intelpython.github.com/dpctl, latest should be updated shortly. 🤞

@github-actions
Copy link

Array API standard conformance tests for dpctl=0.14.3dev1=py310h76be34b_9 ran successfully.
Passed: 120
Failed: 887
Skipped: 109

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.

dpctl.tensor.moveaxis does not support range
4 participants