-
Notifications
You must be signed in to change notification settings - Fork 97
Sparse matrix printing #3593
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 matrix printing #3593
Conversation
Details in PR Signed-off-by: Shreyas Khandekar <60454060+ShreyasKhandekar@users.noreply.github.com>
mypy really wants the sparray type to be indexable, but that is not in the scope of this PR. I can make it the case in a future PR, but for now I would like to silence the error and move on. Therefore I added a __get_item__ method to the sparray class which just raises a NotImplementedError. Signed-off-by: Shreyas Khandekar <60454060+ShreyasKhandekar@users.noreply.github.com>
Matching what SciPy does mostly. Signed-off-by: Shreyas Khandekar <60454060+ShreyasKhandekar@users.noreply.github.com>
As well as mypy built succesfully here Signed-off-by: Shreyas Khandekar <60454060+ShreyasKhandekar@users.noreply.github.com>
e3860ad to
b8bc39c
Compare
bmcdonald3
left a comment
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.
Looks good, thanks Shreyas.
|
Looks like the merge failed due to some sort of error getting the hdf5 package for testing. The error I see is as follows: Setting up libhdf5-dev (1.10.6+repack-4+deb11u1) ...
update-alternatives: using /usr/lib/x86_64-linux-gnu/pkgconfig/hdf5-serial.pc to provide /usr/lib/x86_64-linux-gnu/pkgconfig/hdf5.pc (hdf5.pc) in auto mode
Processing triggers for libc-bin (2.31-13+deb11u10) ...
Installing iconv
rm -rf /__w/arkouda/arkouda//dep/build/libiconv-1.17 /__w/arkouda/arkouda//dep/libiconv-install
mkdir -p /__w/arkouda/arkouda//dep /__w/arkouda/arkouda//dep/build
cd /__w/arkouda/arkouda//dep/build && curl -sL https://ftp.gnu.org/pub/gnu/libiconv/libiconv-1.17.tar.gz | tar xz
gzip: stdin: unexpected end of file
tar: Child returned status 1
tar: Error is not recoverable: exiting now
make: *** [Makefile:169: install-iconv] Error 2This looks unrelated to my PR and is probably some sort of sporadic network error. I would just try adding this to the merge queue again and hope it passes this time. |
|
It looks like there was an issue on the gnu side of things, a broken link for libiconv maybe? |
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.
Looks good! And yah like @ShreyasKhandekar mentioned ftp.gnu.org was down for a bit, see #3595
But it's up now so I'll readd this to the merge queue
Adds printing support for Sparse Matrices as follows:
This matches how SciPy prints their sparse matrices.
Also added a new
nnzmember to the sparrayclass to easily query the number of non zeroes in the sparse matrix.Due to the vertical format of printing here, I've kept the threshold to 20 NNZ instead of 100 which is the standard for pdarrays.