Fixes out kwarg in matmul when axes are appended to inputs
#1610
+46
−7
out kwarg in matmul when axes are appended to inputs
#1610