Делаем
Код: Выделить всё
>>> import numpy as np
>>> a = np.matrix([[1, 2],[3,4]])
>>> print(a * a)
[[ 7 10]
[15 22]]
>>> print(a @ a)
[[ 7 10]
[15 22]]
Подробнее здесь: https://stackoverflow.com/questions/637 ... iplication
Код: Выделить всё
>>> import numpy as np
>>> a = np.matrix([[1, 2],[3,4]])
>>> print(a * a)
[[ 7 10]
[15 22]]
>>> print(a @ a)
[[ 7 10]
[15 22]]