Skip to content

Commit 86d18f2

Browse files
Apply review remarks
1 parent 2c5a935 commit 86d18f2

File tree

4 files changed

+7
-5
lines changed

4 files changed

+7
-5
lines changed

dpnp/dpnp_iface_manipulation.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1754,7 +1754,7 @@ def hstack(tup, *, dtype=None, casting="same_kind"):
17541754

17551755
def matrix_transpose(x, /):
17561756
"""
1757-
Transposes a matrix (or a stack of matrices) ``x``.
1757+
Transposes a matrix (or a stack of matrices) `x`.
17581758
17591759
For full documentation refer to :obj:`numpy.matrix_transpose`.
17601760
@@ -1773,6 +1773,8 @@ def matrix_transpose(x, /):
17731773
See Also
17741774
--------
17751775
:obj:`dpnp.transpose` : Returns an array with axes transposed.
1776+
:obj:`dpnp.linalg.matrix_transpose` : Equivalent function.
1777+
:obj:`dpnp.ndarray.mT` : Equivalent method.
17761778
17771779
Examples
17781780
--------

dpnp/linalg/dpnp_iface_linalg.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -875,7 +875,7 @@ def matrix_rank(A, tol=None, hermitian=False):
875875

876876
def matrix_transpose(x, /):
877877
"""
878-
Transposes a matrix (or a stack of matrices) ``x``.
878+
Transposes a matrix (or a stack of matrices) `x`.
879879
880880
For full documentation refer to :obj:`numpy.linalg.matrix_transpose`.
881881
@@ -894,6 +894,8 @@ def matrix_transpose(x, /):
894894
See Also
895895
--------
896896
:obj:`dpnp.transpose` : Returns an array with axes transposed.
897+
:obj:`dpnp.matrix_transpose` : Equivalent function.
898+
:obj:`dpnp.ndarray.mT` : Equivalent method.
897899
898900
Examples
899901
--------

tests/test_linalg.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2127,8 +2127,6 @@ def test_matrix_transpose():
21272127
):
21282128
inp.linalg.matrix_transpose(a_dp[:, 0])
21292129

2130-
assert_raises(ValueError, inp.linalg.matrix_transpose, a_dp[:, 0])
2131-
21322130

21332131
class TestNorm:
21342132
def setup_method(self):

tests/test_ndarray.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ def test_array_as_index(shape, index_dtype):
259259
assert a[tuple(ind_arr)] == a[1]
260260

261261

262-
# numpy.matrix_transpose() is available since numpy >= 2.0
262+
# numpy.ndarray.mT is available since numpy >= 2.0
263263
@testing.with_requires("numpy>=2.0")
264264
@pytest.mark.parametrize(
265265
"shape",

0 commit comments

Comments
 (0)