Hi, I’m extending pytorch for complex types and I’m getting a TypeError if I multiply two complex tensors.
TypeError: mul received an invalid combination of arguments - got (float), but expected one of:

(float value)
didn’t match because some of the arguments have invalid types: (float)
(torch.ZFloatTensor other)
didn’t match because some of the arguments have invalid types: (!float!)

In _TensorBase there is theis function, but I can’t find where self.mul() is defined.
def __mul__(self, other):
    return self.mul(other)

Can somebody help me out?
I think it’s in torch/csrc/generic/methods/TensorMath.cwrap which then gets parsed in TensorMethods.cpp
But where can I find the code for TypeError handling?