Closed
Description
The functions linalg.trace
and linalg.diagonal
have as default axis1=0, axis2=1
.
This goes against the rest of the documentation, in which a batch of matrices is defined as a tensor with shape (..., M, N)
.
It would be more consistent with the rest of the API to have axis1=-2, axis2=-1
to handle batches of matrices correctly by default.