Skip to content

Commit 6ac1544

Browse files
add choose array method (#1021)
1 parent 4d4371a commit 6ac1544

File tree

2 files changed

+9
-9
lines changed

2 files changed

+9
-9
lines changed

dpnp/dpnp_array.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,15 @@ def astype(self, dtype, order='K', casting='unsafe', subok=True, copy=True):
373373

374374
# 'base',
375375
# 'byteswap',
376-
# 'choose',
376+
377+
def choose(input, choices, out=None, mode='raise'):
378+
"""
379+
Construct an array from an index array and a set of arrays to choose from.
380+
381+
"""
382+
383+
return dpnp.choose(input, choices, out, mode)
384+
377385
# 'clip',
378386
# 'compress',
379387

tests/skipped_tests_gpu.tbl

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -713,14 +713,6 @@ tests/third_party/cupy/indexing_tests/test_indexing.py::TestIndexing::test_diago
713713
tests/third_party/cupy/indexing_tests/test_indexing.py::TestIndexing::test_take_by_array
714714
tests/third_party/cupy/indexing_tests/test_indexing.py::TestIndexing::test_take_by_scalar
715715
tests/third_party/cupy/indexing_tests/test_indexing.py::TestIndexing::test_take_no_axis
716-
tests/third_party/cupy/indexing_tests/test_indexing.py::TestChoose::test_choose
717-
tests/third_party/cupy/indexing_tests/test_indexing.py::TestChoose::test_choose_broadcast
718-
tests/third_party/cupy/indexing_tests/test_indexing.py::TestChoose::test_choose_broadcast2
719-
tests/third_party/cupy/indexing_tests/test_indexing.py::TestChoose::test_choose_broadcast_fail
720-
tests/third_party/cupy/indexing_tests/test_indexing.py::TestChoose::test_choose_clip
721-
tests/third_party/cupy/indexing_tests/test_indexing.py::TestChoose::test_choose_wrap
722-
tests/third_party/cupy/indexing_tests/test_indexing.py::TestChoose::test_raise
723-
tests/third_party/cupy/indexing_tests/test_indexing.py::TestChoose::test_unknown_clip
724716
tests/third_party/cupy/indexing_tests/test_insert.py::TestDiagIndicesFromRaises_param_4_{shape=(-1,)}::test_non_equal_dims
725717
tests/third_party/cupy/indexing_tests/test_insert.py::TestFillDiagonal_param_0_{shape=(3, 3), val=1, wrap=True}::test_columnar_slice
726718
tests/third_party/cupy/indexing_tests/test_insert.py::TestFillDiagonal_param_11_{shape=(2, 2, 2), val=0, wrap=False}::test_1darray

0 commit comments

Comments
 (0)