Open
Conversation
Open
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Fixes two printing bugs:
First on #98, the problem occurs in this section:
AxisKeys.jl/src/show.jl
Lines 195 to 200 in 9c855d5
When there are too many slices, we always try to show 3. But in this case:
We only have 2 slices to show in that dimension. This fix ensures the vector of indices in
fewpanelsis unique, so that we don't have duplicate panels. For the above example, this is what it looks before making each entry unique:Eventually it goes to this line:
AxisKeys.jl/src/show.jl
Line 243 in 9c855d5
And it won't hit the false condition, so no newlines are printed.
Changes fix this:
Makes rendering a tiny bit inconsistent in terms of how many slices are shown depending on dimension size, but it does print correctly now 😄
On #173, I believe the problem is that we need to add checks on the :limit property in
keyed_print_matrix.show(io::IOBuffer, ::MIME{Symbol("text/plain")}, X:::KeyedArray)callsBase.print_matrixwhich the package overloads forKeyedArrays:AxisKeys.jl/src/show.jl
Line 76 in 9c855d5
It doesn't go through
show_nd, so it doesn't access the :limit property. Note, as mentioned in the issue, the string is constructed fromMatrix{Any}, which is a bit costly. But output is now consistent with how arrays are treated.@mcabbott, let me know if these changes look good, if you'd like changes, or if you'd like these two in separate pull requests. Thanks!
Closes #98, #173