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
Relational operators in Heat are treated as binary (element-wise) operations just like arithmetic operations. It follows that, currently, only array-like operands are supported.
This is overly restrictive, we want to be able to run comparisons similar to those shown below without raising an exception:
import heat as ht
>>> a = ht.arange(10)
>>> a == slice(None)
False
>>> a == ...
False
>>> a != slice(None)
True
>>> a != ...
True
Code snippet triggering the error
import heat as ht
a = ht.arange(10)
a == slice(None)
Error message or erroneous outcome
Traceback (most recent call last):
File "<stdin>", line 1, in<module>
File "/Users/c.comito/devel/local/heat/heat/core/relational.py", line 76, in<lambda>
DNDarray.__eq__ = lambda self, other: eq(self, other)
File "/Users/c.comito/devel/local/heat/heat/core/relational.py", line 60, in eq
res = _operations.__binary_op(torch.eq, x, y)
File "/Users/c.comito/devel/local/heat/heat/core/_operations.py", line 82, in __binary_op
raise TypeError(
TypeError: Only DNDarrays and numeric scalars are supported, but input was <class 'slice'>
Version
1.3.x
Python version
3.10
PyTorch version
2.0
MPI version
doesn't matter
The text was updated successfully, but these errors were encountered:
What happened?
Relational operators in Heat are treated as binary (element-wise) operations just like arithmetic operations. It follows that, currently, only array-like operands are supported.
This is overly restrictive, we want to be able to run comparisons similar to those shown below without raising an exception:
Code snippet triggering the error
Error message or erroneous outcome
Version
1.3.x
Python version
3.10
PyTorch version
2.0
MPI version
doesn't matter
The text was updated successfully, but these errors were encountered: