Files
Abhinay Reddy Keesara c5cf6f3f95 DEP: Deprecate np.dot when a.ndim >= 2 and b.ndim > 2 (#32759)
When a.ndim >= 2 and b.ndim > 2, np.dot() and ndarray.dot() place b's leading dimensions in the middle of the result:

a = np.ones((2, 3))
b = np.ones((4, 3, 5))
np.dot(a, b).shape  # (2, 4, 5) - the 4 ends up in the middle

@/matmul gives (4, 2, 5). This PR deprecates the dot behavior for these inputs and suggests numpy.tensordot(a, b, axes=[-1, -2]) for the same result, or @/matmul for batched matrix multiplication.
2026-10-20 21:03:14 +02:00
..
2021-12-08 18:42:45 +00:00
2025-12-02 02:14:14 +02:00