ENH: @ operator differs from the convention for tensor dot #26438
Labels
33 - Question
Question about NumPy usage or development
57 - Close?
Issues which may be closable unless discussion continued
Describe the issue:
Hi, the current$A$ or $B$ is multi-dimensional, $C_{ijm} = \sum_{k} A_{ijk} B_{ikm}$ . However, for multi-dimensional array, is would be more convenient and intuitive if it can somewhat imitate the behavior of tensor dots like using $C_{ij} = \sum_{m,n} A_{imn} B_{nmj}$ . Is it possible to overload functions for such
@
operator hasnp.matmul
function underlying, which means ifC = A@B
is equivalent toC = A@@B
to calculate@@@...
operators?Reproduce the code example:
Error message:
No response
Python and NumPy Versions:
1.26.4
3.11.9 (tags/v3.11.9:de54cf5, Apr 2 2024, 10:12:12) [MSC v.1938 64 bit (AMD64)]
Runtime Environment:
No response
Context for the issue:
No response
The text was updated successfully, but these errors were encountered: