Skip to content

Commit 7bcc0e7

Browse files
Merge pull request #1020 from IntelPython/round-array-method
round array method
2 parents 72b59a1 + edcbe51 commit 7bcc0e7

File tree

2 files changed

+12
-11
lines changed

2 files changed

+12
-11
lines changed

dpnp/dpnp_array.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,18 @@ def reshape(self, d0, *dn, order=b'C'):
616616
return dpnp.reshape(self, shape_tup)
617617

618618
# 'resize',
619-
# 'round',
619+
620+
def round(self, decimals=0, out=None):
621+
"""
622+
Return array with each element rounded to the given number of decimals.
623+
624+
.. seealso::
625+
:obj:`dpnp.around` for full documentation.
626+
627+
"""
628+
629+
return dpnp.around(self, decimals, out)
630+
620631
# 'searchsorted',
621632
# 'setfield',
622633
# 'setflags',

tests/skipped_tests_gpu.tbl

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -307,16 +307,6 @@ tests/third_party/cupy/core_tests/test_ndarray_math.py::TestRoundHalfway_param_0
307307
tests/third_party/cupy/core_tests/test_ndarray_math.py::TestRoundHalfway_param_1_{decimals=-2}::test_round_halfway_uint
308308
tests/third_party/cupy/core_tests/test_ndarray_math.py::TestRoundHalfway_param_2_{decimals=-1}::test_round_halfway_uint
309309
tests/third_party/cupy/core_tests/test_ndarray_math.py::TestRoundHalfway_param_3_{decimals=0}::test_round_halfway_uint
310-
tests/third_party/cupy/core_tests/test_ndarray_math.py::TestRound_param_0_{decimals=-2}::test_round
311-
tests/third_party/cupy/core_tests/test_ndarray_math.py::TestRound_param_0_{decimals=-2}::test_round_out
312-
tests/third_party/cupy/core_tests/test_ndarray_math.py::TestRound_param_1_{decimals=-1}::test_round
313-
tests/third_party/cupy/core_tests/test_ndarray_math.py::TestRound_param_1_{decimals=-1}::test_round_out
314-
tests/third_party/cupy/core_tests/test_ndarray_math.py::TestRound_param_2_{decimals=0}::test_round
315-
tests/third_party/cupy/core_tests/test_ndarray_math.py::TestRound_param_2_{decimals=0}::test_round_out
316-
tests/third_party/cupy/core_tests/test_ndarray_math.py::TestRound_param_3_{decimals=1}::test_round
317-
tests/third_party/cupy/core_tests/test_ndarray_math.py::TestRound_param_3_{decimals=1}::test_round_out
318-
tests/third_party/cupy/core_tests/test_ndarray_math.py::TestRound_param_4_{decimals=2}::test_round
319-
tests/third_party/cupy/core_tests/test_ndarray_math.py::TestRound_param_4_{decimals=2}::test_round_out
320310
tests/third_party/cupy/core_tests/test_ndarray_reduction.py::TestArrayReduction::test_max_all
321311
tests/third_party/cupy/core_tests/test_ndarray_reduction.py::TestArrayReduction::test_max_all_keepdims
322312
tests/third_party/cupy/core_tests/test_ndarray_reduction.py::TestArrayReduction::test_max_axis0

0 commit comments

Comments
 (0)