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

Add type checking in assert_dtype_allclose for inexact dtypes #1634

Merged
merged 10 commits into from
Dec 5, 2023

Conversation

vlad-perevezentsev
Copy link
Collaborator

This PR improves assert_dtype_allclose function by adding type checking for cases with inexact data types.
It makes the behaviour of the function consistent with its purpose and improves the reliability of data type checking in dpnp functions.

  • Have you provided a meaningful PR description?
  • Have you added a test, reproducer or referred to 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 filing the PR as a draft?

Copy link
Contributor

github-actions bot commented Dec 1, 2023

View rendered docs @ https://intelpython.github.io/dpnp/pull//index.html

Copy link
Contributor

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

Thank you @vlad-perevezentsev for the suggested improvement!

tests/helper.py Outdated Show resolved Hide resolved
tests/helper.py Outdated Show resolved Hide resolved
tests/helper.py Show resolved Hide resolved
tests/helper.py Outdated Show resolved Hide resolved
@antonwolfy antonwolfy merged commit 2c8cbb5 into master Dec 5, 2023
37 of 44 checks passed
@antonwolfy antonwolfy deleted the fix_helper_func branch December 5, 2023 20:07
github-actions bot added a commit that referenced this pull request Dec 5, 2023
* Add dtype checking for inexact dtype in assert_dtype_allclose

* Update test_out_dtypes in TestDivide

* Add a check for support of 16 bit types

* Add an empty line after the description

* fix condition when numpy`s array is not float16

* Address the remarks

* Update test_sum_float in test_sum.py

* Add a new check_only_type_kind param to assert_dtype_allclose

* Update test_sum and test_fft

* Use check_only_type_kind in test_fft_rfft 2c8cbb5
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