Use Braille to display adjoint and transposed sparse matrices#36177
Use Braille to display adjoint and transposed sparse matrices#36177simeonschaub merged 6 commits intoJuliaLang:masterfrom
Conversation
|
|
||
| const brailleBlocks = UInt16['⠁', '⠂', '⠄', '⡀', '⠈', '⠐', '⠠', '⢀'] | ||
| function _show_with_braille_patterns(io::IOContext, S::AbstractSparseMatrixCSC) | ||
| function _show_with_braille_patterns(io::IOContext, S::AbstractSparseMatrixCSCInclAdjointAndTranspose) |
There was a problem hiding this comment.
This linear algebra aliases are getting kind of ridiculous. Not a critique, just a humorous observation.
There was a problem hiding this comment.
Yes, I'm aware of that, I also don't like it.
If anybody has a better solution, feel free to suggest something.
There was a problem hiding this comment.
Not to be tackled in this PR!
| _show_with_braille_patterns(io, S) | ||
| end | ||
|
|
||
| function Base.show(io::IOContext, S::Union{Adjoint{<:Any,<:AbstractSparseMatrixCSC},Transpose{<:Any,<:AbstractSparseMatrixCSC}}) |
There was a problem hiding this comment.
This is the method which I'm unable to replace with
function Base.show(io::IOContext, S::AbstractSparseMatrixCSCInclAdjointAndTranspose)See the error in the description of the PR.
|
Any update on this? |
08e0504 to
61667d1
Compare
|
I have done a rebase to resolve the conflicts. |
|
Would be nice to rebase to master and see if we can get this ready for merging. |
2b909fc to
ee35f7d
Compare
|
I haven't deeply reviewed the code, but broadly speaking, it looks good to me. Those really long type names make me cringe just a little bit - but there's nothing we can do about all that right now. :-) |
|
Yeah, definitely agree. Will merge later today if there are no more comments. |
This PR fixes #34268.
Adjoint and transposed sparse matrices are now printed with Braille, similar to regular sparse matrices.
For some reason, merging the two identical
Base.showmethods into a methodby using our introduced
consttype, results in weird error, which arises when trying to print a sparse matrix:It took me so much time to figure that out, and I still don't know why this happened...
So that's the reason why I have that identical (except from the signature)
Base.showmethod twice.