Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Add type checking in assert_dtype_allclose for inexact dtypes#1634

Merged
antonwolfy merged 10 commits intomasterIntelPython/dpnp:masterfrom
fix_helper_funcIntelPython/dpnp:fix_helper_funcCopy head branch name to clipboard
Dec 5, 2023
Merged

Add type checking in assert_dtype_allclose for inexact dtypes#1634
antonwolfy merged 10 commits intomasterIntelPython/dpnp:masterfrom
fix_helper_funcIntelPython/dpnp:fix_helper_funcCopy head branch name to clipboard

Conversation

@vlad-perevezentsev
Copy link
Contributor

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?

@github-actions
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
@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

Morty Proxy This is a proxified and sanitized view of the page, visit original site.