-
Notifications
You must be signed in to change notification settings - Fork 54
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
Introduced a format for displaying the DCSR_matrix #1176
Closed
Closed
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
9b60fad
implemented a basic format for displaying DCSR_matrix.
Sai-Suraj-27 70ea899
Updated the format slightly.
Sai-Suraj-27 d4652ea
Corrected a mistake in if condition.
Sai-Suraj-27 3f85926
Updated the format slightly.
Sai-Suraj-27 5e00314
Merge branch 'main' into sparse_1
mrfh92 e7878c2
Merge branch 'main' of https://github.com/helmholtz-analytics/heat in…
Sai-Suraj-27 484db6a
Merge branch 'sparse_1' of https://github.com/SaiSuraj27/heat into sp…
Sai-Suraj-27 539130c
Updated the format to include indptr as well..
Sai-Suraj-27 326d4ff
Merge branch 'main' into sparse_1
Sai-Suraj-27 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be better if this function is moved to the
core/printing
module. There are cases like local print vs global print to be handled. See the__str__
method of theDNDarray
class for more information.And it is usually best to use the printing format used by PyTorch since it gives more information to the user. The information outputted by
__str__
should prioritize user-readability more than anything else. Just theindptr
andindices
would be too difficult to understand. I, personally, would prefer to see the exact coordinates being printed out. I say this because the users of Heat shouldn't be expected to know about the CSR matrix and its format. They should just be able to use this more-efficient data structure without having to learn too much about it.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What @mrfh92 says also seems acceptable to me. Maybe the users won't want to see the actual data points. But my only problem with this solution is, the users wouldn't be able to see the data points even if they wanted to. There is no other way for them to get the coordinates if we don't show it in the
print
output.