-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Align sptensor comparison operator functionality #287
Comments
There are some curiosities with empty
Zooming in more closely:
Provided a shape, |
Currently, there is a TODO listed in the
sptensor
class, noting that the comparison operators (__gt__
,__ge__
,__lt__
,__le__
,__eq__
,__ne__
) share a lot of code and could be streamlined.When evaluating
sptensor
related to #286, I also saw that comparisons involving empty tensors led to errors that were not useful. The operator__lt__
works for emptysptensor
objects, but the others do not. This should be fixed.Suggestion: Provide support for all comparison operators to handle empty tensors. When either or both operands are empty tensors (sparse or dense), the results should be an empty tensor of the type of the first operand (i.e.,
self
).Reproducing the current functionality:
The text was updated successfully, but these errors were encountered: