Closed fyeee closed 1 year ago
For python >= 3.5 it supports a new matrix multiplication operator @ which calls the __matmul__. However the following operation produces error
@
__matmul__
import pandas as pd df1 = pd.DataFrame([[0,1],[2,3]]) df2 = pd.DataFrame([[4,5],[6,7]]) ldf1 = Proxy(lambda: df1) ldf2 = Proxy(lambda: df2) ldf1 @ ldf2
TypeError: unsupported operand type(s) for @: 'Proxy' and 'Proxy'
While operations on Proxy object and pandas DataFrame is working properly
Proxy
df1 = pd.DataFrame([[0,1],[2,3]]) df2 = pd.DataFrame([[4,5],[6,7]]) ldf1 = Proxy(lambda: df1) ldf1 @ df2 # runs without issue df2 @ ldf1 # runs without issue
Checking the source code, I noticed __matmul__ is not defined in the source code, I wonder is it possible to add the operator into the package?
Released in version 1.9.0.
For python >= 3.5 it supports a new matrix multiplication operator
@
which calls the__matmul__
. However the following operation produces errorTypeError: unsupported operand type(s) for @: 'Proxy' and 'Proxy'
While operations on
Proxy
object and pandas DataFrame is working properlyChecking the source code, I noticed
__matmul__
is not defined in the source code, I wonder is it possible to add the operator into the package?