I'm reading someone else's code and I don't understand what is the use of @z
here:
x = np.linalg.inv(P)@z
and when i Google @z
(here), it seems that the search engine ignores the @
, how come?
I'm reading someone else's code and I don't understand what is the use of @z
here:
x = np.linalg.inv(P)@z
and when i Google @z
(here), it seems that the search engine ignores the @
, how come?
@
refers to the matrix multiplication operator.
From the numpy
docs:
The @ operator can be used as a shorthand for np.matmul on ndarrays.
x1 = np.array([2j, 3j]) x2 = np.array([2j, 3j]) x1 @ x2 (-13+0j)