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

Sparse logical #269

Merged
merged 4 commits into from
Sep 28, 2023
Merged

Sparse logical #269

merged 4 commits into from
Sep 28, 2023

Conversation

ntjohnson1
Copy link
Collaborator

@ntjohnson1 ntjohnson1 commented Sep 27, 2023

Resolves #256 and #257 but maybe raises more questions than it answers. It matches what you described as expected behavior. (Indicator tensors with 1.0, 0.0)

It raises the question on if we should track the dtype (could be a hidden variable or a property). Or even more explicitly could be set when constructing the tensor (I kind of hacked the vals in the sptensor to make things make sense; however would be nice to take a dtype argument on construction).

You mentioned in the issue we don't do boolean tensors but for equality we currently do. Should those also get the same indicator treatment?

>> import pyttb as ttb
>> T = ttb.tenones((2,2))
>> T == T
tensor of shape (2, 2)
data[:, :] =
[[ True  True]
 [ True  True]]

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

@ntjohnson1 ntjohnson1 linked an issue Sep 27, 2023 that may be closed by this pull request
@dmdunla
Copy link
Collaborator

dmdunla commented Sep 28, 2023

Approved, but the bigger issue is explicitly handling dtypes for our tensor classes.

@dmdunla dmdunla merged commit b57a19b into sandialabs:main Sep 28, 2023
7 checks passed
@ntjohnson1 ntjohnson1 deleted the sparse_logical branch September 28, 2023 11:25
@ntjohnson1
Copy link
Collaborator Author

Do you mind filing a ticket for that issue just so we don't forget? Not sure if it's needed for 2.0 or not

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.

sptensor.logical_or has inconsistent output sptensor.logical_and does not have expected behavior
2 participants