Skip to content

Commit 036d97a

Browse files
round array method
1 parent 3cbec4a commit 036d97a

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
@@ -604,7 +604,18 @@ def reshape(self, d0, *dn, order=b'C'):
604604
return dpnp.reshape(self, shape_tup)
605605

606606
# 'resize',
607-
# 'round',
607+
608+
def round(self, decimals=0, out=None):
609+
"""
610+
Return array with each element rounded to the given number of decimals.
611+
612+
.. seealso::
613+
:obj:`dpnp.around` for full documentation.
614+
615+
"""
616+
617+
return dpnp.around(self, decimals, out)
618+
608619
# 'searchsorted',
609620
# 'setfield',
610621
# 'setflags',

tests/skipped_tests_gpu.tbl

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

0 commit comments

Comments
 (0)