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

[BUG] unique does not support axis argument #1146

Open
suranap opened this issue Jul 25, 2024 · 0 comments
Open

[BUG] unique does not support axis argument #1146

suranap opened this issue Jul 25, 2024 · 0 comments

Comments

@suranap
Copy link

suranap commented Jul 25, 2024

Software versions

Python : 3.10.14 | packaged by conda-forge | (main, Mar 20 2024, 12:45:18) [GCC 12.3.0]
Platform : Linux-5.4.0-169-generic-x86_64-with-glibc2.31
Legion : legion-24.03.0
Legate : 24.01.00.dev+38.g90944d7.dirty
Cunumeric : 24.01.00.dev+32.g364e95dc.dirty
Numpy : 1.26.4
Scipy : 1.13.1
Numba : 0.59.1
CTK package : cuda-version-11.7-h67201e3_3 (conda-forge)
GPU driver : 535.54.03
GPU devices :
GPU 0: Tesla P100-SXM2-16GB
GPU 1: Tesla P100-SXM2-16GB
GPU 2: Tesla P100-SXM2-16GB
GPU 3: Tesla P100-SXM2-16GB

Jupyter notebook / Jupyter Lab version

No response

Expected behavior

>>> import numpy as np
>>> tmp = list(range(20))
>>> np.unique(np.array(tmp).reshape(10,2), axis=0)
array([[ 0,  1],
       [ 2,  3],
       [ 4,  5],
       [ 6,  7],
       [ 8,  9],
       [10, 11],
       [12, 13],
       [14, 15],
       [16, 17],
       [18, 19]])

Observed behavior

>>> import cunumeric as cnp
>>> cnp.unique(np.array(tmp).reshape(10,2), axis=0)
array([ 0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16,
       17, 18, 19])

Furthermore, I ran numpy's tests against cunumeric. PyTest reports the following errors for TestUnique:

FAILED test_arraysetops.py::TestUnique::test_unique_1d - NotImplementedError: cuNumeric does not support dtype=float128
FAILED test_arraysetops.py::TestUnique::test_unique_axis_errors - NotImplementedError: cuNumeric does not support dtype=object
FAILED test_arraysetops.py::TestUnique::test_unique_axis_list - AssertionError:
FAILED test_arraysetops.py::TestUnique::test_unique_axis - AssertionError:
FAILED test_arraysetops.py::TestUnique::test_unique_axis_zeros - AssertionError:
FAILED test_arraysetops.py::TestUnique::test_unique_masked - NotImplementedError: Keyword arguments for `unique` are not yet supported
FAILED test_arraysetops.py::TestUnique::test_unique_sort_order_with_axis - AssertionError:
FAILED test_arraysetops.py::TestUnique::test_unique_nanequals - TypeError: unique() got an unexpected keyword argument 'equal_nan'

In fact, you could port all the tests from numpy to check how you're doing on compatibility.

Example code or instructions

see above

Stack traceback or browser console output

No response

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

No branches or pull requests

1 participant