@ operator (matrix multiplication) for itom.dataObject (python) implemented (Python > 3.5)
M. Gronle (approved)
Branch: matmul_operator
Branch: master
Merged
Merged pull request
Merged in matmul_operator (pull request #54)
Merged in matmul_operator (pull request #54)
Implementation of the matmul (@) operator for the :py:class:
itom.dataObject
. This is the preferred way for a matrix multiplication of two dataObjects. This is only available from Python 3.5 on. This fixes the issue #142.Unittests are added for this operator.
Hint: dataObject only supports matrix muliplications for float32 and float64.
Example:
d1 = dataObject([2, 3], dtype='float32', data=[-1, 2, ...]) d2 = dataObject.eye(3, dtype='float32') d3 = d1 @ d2 # d3 is expected to be equal to d1
Â