-
Notifications
You must be signed in to change notification settings - Fork 63
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
Remove duplicate *cat
implementations
#1467
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1467 +/- ##
==========================================
+ Coverage 84.72% 85.63% +0.91%
==========================================
Files 110 111 +1
Lines 29365 31223 +1858
==========================================
+ Hits 24880 26739 +1859
+ Misses 4485 4484 -1
... and 23 files with indirect coverage changes 📣 Codecov offers a browser extension for seamless coverage viewing on GitHub. Try it in Chrome or Firefox today! |
If we remove them, we need an equally fast alternative for concatenating a list of matrices. |
I think you don't like But there is already |
This is exactly the point. One should never splat a vector. Base says to use |
|
Yes, they should be removed too:
|
Maybe to summarise my point. All these methods need to go. But I don't want to do it unless we have a good substitute, which is not a new function with some obscure name differing from Base. |
return M | ||
end | ||
|
||
function Base.hcat(A::MatElem...) |
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 we really need to remove this? I just tried with removing just the preceding methods, and vcat(Union{}[])
as well as vcat()
worked just fine.
Same question for the other methods taking ::MatElem...
args
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.
They already exist in better in src/Matrix.jl
. So these removed methods here get never actually called
We plan to go forward with this PR here, but I think we decided to first fix all the call sites to make the transition a bit smoother. |
thofma/Hecke.jl#1253 will fix many obvious call sites in Hecke. |
Is this ready for merging into a breaking AA release? Or anything that should be done before (then perhaps convert it to draft)? |
From my POV this can be merged. @thofma do you have any objections? |
Resolves #1466.
The
*cat(::MatElem...)
are bad duplicates to methods insrc/Matrix.jl
.The
*cat(::Vector{T}) where T < MatElem
shouldn't have been there in the first place. They originate form Nemo/Hecke. They shadow the*cat(::Vector...)
dispatch from base with a 1-elem vararg, and something similar isn't available anywhere else either. So I suggest to remove them. Let's talk about it this afternoon.