You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Issue: Allowing Scalar Multiplications with Complex Numbers in Tensor Trains
Description:
When using torchTT, scalar multiplications with complex numbers are not supported. This seems to be an oversight as everything works perfectly when they are allowed.
Also multiplying with torch.Tensor scalars isinstance(other, tn.tensor) raises "TypeError: isinstance() arg 2 must be a type, a tuple of types, or a union"
Steps to Reproduce:
Attempt to multiply a tensor train with a complex scalar or torch.Tensor scalar.
Observe the error.
Proposed Solution:
I have created a pull request to address this issue by:
Changing isinstance(other, tn.tensor) to isinstance(other, tn.Tensor) in def __mul__(self, other).
Adding support for complex scalars by adding or isinstance(other, complex).
Updating the descriptions and error messages accordingly.
Issue: Allowing Scalar Multiplications with Complex Numbers in Tensor Trains
Description:
Steps to Reproduce:
Proposed Solution:
I have created a pull request to address this issue by:
isinstance(other, tn.tensor)
toisinstance(other, tn.Tensor)
indef __mul__(self, other)
.or isinstance(other, complex)
.Related Pull Request:
The text was updated successfully, but these errors were encountered: