It does both - it’s like a more general version of matrix multiplication.

The details are here: numpy.matmul — NumPy v2.1 Manual
It does both - it’s like a more general version of matrix multiplication.

The details are here: numpy.matmul — NumPy v2.1 Manual