last 2 axis
numpy.matmul — NumPy v2.1 Manual
A location into which the result is stored. If provided, it must have
a shape that matches the signature (n,k),(k,m)->(n,m). If not
provided or None, a freshly-allocated array is returned.
https://numpy.org/doc/stable/reference/generated/numpy.matmul.html

Seonglae Cho