ENH: Dask: `sort` and `argsort` by crusaderky · Pull Request #239 · data-apis/array-api-compat · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
118 changes: 110 additions & 8 deletions array_api_compat/dask/array/_aliases.py
22 changes: 5 additions & 17 deletions dask-xfails.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,13 @@ array_api_tests/test_array_object.py::test_setitem_masking
# Various indexing errors
array_api_tests/test_array_object.py::test_getitem_masking

# asarray(copy=False) is not yet implemented
# copied from numpy xfails, TODO: should this pass with dask?
array_api_tests/test_creation_functions.py::test_asarray_arrays

# zero division error, and typeerror: tuple indices must be integers or slices not tuple
array_api_tests/test_creation_functions.py::test_eye

# finfo(float32).eps returns float32 but should return float
array_api_tests/test_data_type_functions.py::test_finfo[float32]

# out[-1]=dask.aray<getitem ...> but should be some floating number
# out[-1]=dask.array<getitem ...> but should be some floating number
# (I think the test is not forcing the op to be computed?)
array_api_tests/test_creation_functions.py::test_linspace

Expand All @@ -48,15 +44,7 @@ array_api_tests/test_special_cases.py::test_iop[__ipow__(x1_i is -0 and x2_i > 0
array_api_tests/test_special_cases.py::test_iop[__ipow__(x1_i is -infinity and x2_i > 0 and not (x2_i.is_integer() and x2_i % 2 == 1)) -> +infinity]
array_api_tests/test_special_cases.py::test_binary[__pow__(x1_i is -infinity and x2_i > 0 and not (x2_i.is_integer() and x2_i % 2 == 1)) -> +infinity]

# No sorting in dask
array_api_tests/test_has_names.py::test_has_names[sorting-argsort]
array_api_tests/test_has_names.py::test_has_names[sorting-sort]
array_api_tests/test_sorting_functions.py::test_argsort
array_api_tests/test_sorting_functions.py::test_sort
array_api_tests/test_signatures.py::test_func_signature[argsort]
array_api_tests/test_signatures.py::test_func_signature[sort]

# Array methods and attributes not already on np.ndarray cannot be wrapped
# Array methods and attributes not already on da.Array cannot be wrapped
array_api_tests/test_has_names.py::test_has_names[array_method-__array_namespace__]
array_api_tests/test_has_names.py::test_has_names[array_method-to_device]
array_api_tests/test_has_names.py::test_has_names[array_attribute-device]
Expand All @@ -76,6 +64,7 @@ array_api_tests/test_set_functions.py::test_unique_values
# fails for ndim > 2
array_api_tests/test_linalg.py::test_svdvals
array_api_tests/test_linalg.py::test_cholesky

# dtype mismatch got uint64, but should be uint8, NPY_PROMOTION_STATE=weak doesn't help :(
array_api_tests/test_linalg.py::test_tensordot

Expand Down Expand Up @@ -105,6 +94,8 @@ array_api_tests/test_linalg.py::test_cross
array_api_tests/test_linalg.py::test_det
array_api_tests/test_linalg.py::test_eigh
array_api_tests/test_linalg.py::test_eigvalsh
array_api_tests/test_linalg.py::test_matrix_norm
array_api_tests/test_linalg.py::test_matrix_rank
array_api_tests/test_linalg.py::test_pinv
array_api_tests/test_linalg.py::test_slogdet
array_api_tests/test_has_names.py::test_has_names[linalg-cross]
Expand All @@ -115,9 +106,6 @@ array_api_tests/test_has_names.py::test_has_names[linalg-matrix_power]
array_api_tests/test_has_names.py::test_has_names[linalg-pinv]
array_api_tests/test_has_names.py::test_has_names[linalg-slogdet]

array_api_tests/test_linalg.py::test_matrix_norm
array_api_tests/test_linalg.py::test_matrix_rank

# missing mode kw
# https://github.com/dask/dask/issues/10388
array_api_tests/test_linalg.py::test_qr
Expand Down
73 changes: 72 additions & 1 deletion tests/test_dask.py