-
Notifications
You must be signed in to change notification settings - Fork 56
further tweak tensor and block show #322
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
Conversation
|
Your PR no longer requires formatting changes. Thank you for your contribution! |
Codecov Report❌ Patch coverage is
... and 1 file with indirect coverage changes 🚀 New features to boost your workflow:
|
I think I agree with this, which might mean that we really just want a different show method for Otherwise this definitely looks like a great improvement I can get behind! |
|
Ok, I've changed the implementation such that explicitly calling |
lkdvos
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.
Do you think it would make sense to have some dummy tests that just checks that the output of showing a tensor is what it is now, such that we get notified if we (accidentally/intentionally) change this in the future?
Otherwise this looks ready for me.
Co-authored-by: Lukas Devos <ldevos98@gmail.com>
|
I merged the other PR in hope of fixing the CI here, which would then automerge this tonight. |
* initial basic design SectorVector * some additional functionality * relax `foreachblock` signature * replace `SectorDict` with `SectorVector` for eig/svdvals * export `svd_vals` * clean up SectorVector design * small fix * add finitedifferences support * update changelog * some simplifications and extensions * some further fixes * some more fixes * update dates --------- Co-authored-by: Jutho Haegeman <jutho.haegeman@ugent.be>
@lkdvos , this tries to get some sensible default for showing some blocks while respecting the displaysize when
:limit = true. Since standard repl printing sets:limit = true, this is the default printing.However, with the current implementation, this also means that the blocks will be truncated (both the matrices itself and the number of blocks shown) in both the output of the tensor
tand in the output ofblocks(t).There might be a case to be made that, if a user calls
blocks(t)explicitly as a REPL prompt, the user wants to see all blocks, and so we should "ignore" the default:limit = truesetting of REPL printing, at least for truncating the number of blocks, but we could still pass on:limit = trueto the individual block printing. This would then be analogous to how an array of size n x n x 10 with large n is shown. All 10 slices along the 3rd dimension are shown, but every slice is truncated such that single slice fits the display.