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

Replaced few TypeError with ValueError in _elementwise_common #1496

Merged

Conversation

oleksandr-pavlyk
Copy link
Collaborator

Used ValueError instead of TypeError per Python guidelines.

Inappropriate uses were pointed out by @vtavana (Thank you)

  • 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?

Used ValueError instead of TypeError per Python guidelines.
Inappriate uses were pointed out by @vtavana
@oleksandr-pavlyk
Copy link
Collaborator Author

This change was prompted per discussion in #1490

Copy link

vtavana
vtavana previously approved these changes Jan 18, 2024
Copy link
Collaborator

@vtavana vtavana left a comment

Choose a reason for hiding this comment

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

Thank you, @oleksandr-pavlyk!

Copy link

Array API standard conformance tests for dpctl=0.15.1dev3=py310h15de555_7 ran successfully.
Passed: 892
Failed: 17
Skipped: 86

@oleksandr-pavlyk oleksandr-pavlyk force-pushed the replace-typeerror-with-valueerror-as-appropriate branch from 9d172b7 to a2ec2f2 Compare January 18, 2024 23:43
Copy link

Array API standard conformance tests for dpctl=0.15.1dev3=py310h15de555_8 ran successfully.
Passed: 891
Failed: 18
Skipped: 86

@coveralls
Copy link
Collaborator

Coverage Status

coverage: 90.187%. remained the same
when pulling a2ec2f2 on replace-typeerror-with-valueerror-as-appropriate
into fbe0081 on master.

Copy link

Array API standard conformance tests for dpctl=0.15.1dev3=py310h15de555_9 ran successfully.
Passed: 891
Failed: 18
Skipped: 86

Copy link

Array API standard conformance tests for dpctl=0.15.1dev3=py310h15de555_9 ran successfully.
Passed: 890
Failed: 19
Skipped: 86

Copy link
Collaborator

@ndgrigorian ndgrigorian left a comment

Choose a reason for hiding this comment

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

Tests now pass so LGTM! Thanks for this clean up @oleksandr-pavlyk

Other incorrect TypeErrors seem to exist in the project but those can be addressed in separate PRs.

@oleksandr-pavlyk oleksandr-pavlyk merged commit 2cb368c into master Jan 19, 2024
38 of 47 checks passed
@oleksandr-pavlyk oleksandr-pavlyk deleted the replace-typeerror-with-valueerror-as-appropriate branch January 19, 2024 02:14
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.

4 participants