Skip to content

Commit 72b59a1

Browse files
diagonal array method (#1019)
1 parent 3cbec4a commit 72b59a1

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

dpnp/dpnp_array.py

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,19 @@ def conjugate(self):
408408
# 'cumprod',
409409
# 'cumsum',
410410
# 'data',
411-
# 'diagonal',
411+
412+
def diagonal(input, offset=0, axis1=0, axis2=1):
413+
"""
414+
Return specified diagonals.
415+
416+
See Also
417+
--------
418+
:obj:`dpnp.diagonal`
419+
420+
"""
421+
422+
return dpnp.diagonal(input, offset, axis1, axis2)
423+
412424
# 'dot',
413425

414426
@property

tests/skipped_tests_gpu.tbl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -288,8 +288,6 @@ tests/third_party/cupy/core_tests/test_ndarray_copy_and_view.py::TestArrayCopyAn
288288
tests/third_party/cupy/core_tests/test_ndarray_copy_and_view.py::TestArrayCopyAndView::test_astype_strides_swapped
289289
tests/third_party/cupy/core_tests/test_ndarray_copy_and_view.py::TestArrayCopyAndView::test_astype_type_c_contiguous_no_copy
290290
tests/third_party/cupy/core_tests/test_ndarray_copy_and_view.py::TestArrayCopyAndView::test_astype_type_f_contiguous_no_copy
291-
tests/third_party/cupy/core_tests/test_ndarray_copy_and_view.py::TestArrayCopyAndView::test_diagonal1
292-
tests/third_party/cupy/core_tests/test_ndarray_copy_and_view.py::TestArrayCopyAndView::test_diagonal2
293291
tests/third_party/cupy/core_tests/test_ndarray_copy_and_view.py::TestArrayCopyAndView::test_transposed_fill
294292
tests/third_party/cupy/core_tests/test_ndarray_copy_and_view.py::TestArrayCopyAndView::test_transposed_flatten
295293
tests/third_party/cupy/core_tests/test_ndarray_copy_and_view.py::TestArrayCopyAndView::test_flatten_copied

0 commit comments

Comments
 (0)