Skip to content
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

Sptensor compare #331

Merged
merged 23 commits into from
Nov 11, 2024
Merged

Sptensor compare #331

merged 23 commits into from
Nov 11, 2024

Conversation

ntjohnson1
Copy link
Collaborator

@ntjohnson1 ntjohnson1 commented Nov 10, 2024

Should resolve #287

I added tests that should cover the enumerated cases. I also cleaned up the inconsistency Jeremy found. Previously our eq/ne were inconsistent with lt,le,gt,ge where the first yielded boolean tensors and the later yielded float tensors with 1.0/0.0 for the boolean context. I think tensor and sptensor still are mismatched on this with tensor returning booleans. There is already a ticket for thinking about this.

I pulled the gt/lt/le/ge code into a common method but it's a little messier than it could be but I think incremental progress is beneficial.

I branched off of #330 since I had that locally. If that proves controversial I assume I can rebase to main without too much headache.


📚 Documentation preview 📚: https://pyttb--331.org.readthedocs.build/en/331/

@ntjohnson1 ntjohnson1 marked this pull request as ready for review November 10, 2024 18:52
@ntjohnson1 ntjohnson1 requested a review from dmdunla November 10, 2024 18:52
@dmdunla dmdunla merged commit 5a93e4b into sandialabs:main Nov 11, 2024
9 checks passed
@ntjohnson1 ntjohnson1 deleted the sptensor_cmp branch November 12, 2024 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Align sptensor comparison operator functionality
2 participants