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

ENH: equal() to API standard #152

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

tylerjereddy
Copy link
Contributor

  • adjust the equal() ufunc to pass its array API standard test, and turn this test on in the CI

  • the changes include improved broadcasting and (type) casting support

  • because equality testing is so common/rampant, this required a few more shims than I'd like...

Some warnings may show up in array API suite, feel free to help me with those:

array_api_tests/meta/test_utils.py::test_int_to_dtype
  /home/tyler/github_projects/pykokkos/pykokkos/interface/views.py:687: DeprecationWarning: NumPy will stop allowing conversion of out-of-bound Python integers to integer arrays.  The conversion of 1491047602 to int16 will fail in the future.
  For the old behavior, usually:
      np.array(value).astype(dtype)`
  will give the desired result (the cast overflows).
    arr = np.asarray(obj, dtype=dtype.np_equiv)

* adjust the `equal()` ufunc to pass its array
API standard test, and turn this test on in the CI

* the changes include improved broadcasting and
(type) casting support

* because equality testing is so common/rampant, this
required a few more shims than I'd like...
def equal_impl_5d_int8(tid: int,
view1: pk.View5D[pk.int8],
view2: pk.View5D[pk.int8],
out: pk.View5D[pk.uint8]):
Copy link
Contributor Author

Choose a reason for hiding this comment

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

as with several recent PRs, feel free to help with formatting for the large blocks of largely copy-paste templates of workunits..

@NaderAlAwar NaderAlAwar changed the base branch from develop to main May 24, 2023 20:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants