From 1f26e54eb4f969f61f834b6857f125a45ffbea68 Mon Sep 17 00:00:00 2001 From: Athan Reines Date: Mon, 30 Aug 2021 10:43:14 -0700 Subject: [PATCH] Add specification for `.mT` attribute --- spec/API_specification/array_object.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/spec/API_specification/array_object.md b/spec/API_specification/array_object.md index dcf78228b..18f9552bd 100644 --- a/spec/API_specification/array_object.md +++ b/spec/API_specification/array_object.md @@ -215,6 +215,19 @@ Hardware device the array data resides on. - a `device` object (see {ref}`device-support`). +(attribute-mT)= +### mT + +Transpose of a matrix (or a stack of matrices). + +If an array instance has fewer than two dimensions, an error should be raised. + +#### Returns + +- **out**: _<array>_ + + - array whose last two dimensions (axes) are permuted in reverse order relative to original array (i.e., for an array instance having shape `(..., M, N)`, the returned array must have shape `(..., N, M)`). The returned array must have the same data type as the original array. + (attribute-ndim)= ### ndim