Computes the trace (sum of diagonal elements) of a 2-D array.
Arguments
- x
(
arrayish)
One input, with exactly 2 axes. Can be any data type. An R value materializes at its default data type.
Value
(arrayish)
A scalar with x's data type, except a boolean input, which is counted
at the default integer data type (see default_dtypes()).