@ operator (matrix multiplication) for itom.dataObject (python) implemented (Python > 3.5)

Merged
#54 · Created  · Last updated

Merged pull request

Merged in matmul_operator (pull request #54)

6ef3ecd·Author: ·Closed by: ·2020-11-09

Description

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

 

0 attachments

0 comments

Loading commits...