![]() |
VOOZH | about |
In NumPy, we can find Einsteinās summation convention of two given multidimensional arrays with the help of numpy.einsum(). We will pass two arrays as a parameter and it will return the Einsteinās summation convention.
Syntax: numpy.einsum()
Parameter: Two arrays.
Return : It will return the Einsteinās summation convention.
Example 1:
Output:
[1 2 3] [4 5 6] 32
Example 2:
Output:
[[0 1 2] [3 4 5] [6 7 8]] [[10 11 12] [13 14 15] [16 17 18]] [[ 45 48 51] [162 174 186] [279 300 321]]