-
Notifications
You must be signed in to change notification settings - Fork 56
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
Incomplete promotion rules for sparse matrices #54
Comments
Is this ok: promote_rule(::Type{SparseMatrixCSC{T1,S1}},::Type{SparseMatrixCSC{T2,S2}}) where {T1,T2,S1,S2} = SparseMatrixCSC{promote_type(T1,T2),promote_type(S1,S2)} |
Does JuliaLang/julia#22757 fix this problem? |
I have been using the following locally: promote_rule{T1,T2,S1,S2}(::Type{SparseMatrixCSC{T1,S1}},::Type{SparseMatrixCSC{T2,S2}}) = SparseMatrixCSC{promote_type(T1,T2),promote_type(S1,S2)}
promote_rule{T1,S1,T2,S2<:AbstractMatrix{T2}}(::Type{SparseMatrixCSC{T1,S1}},::Type{S2}) = Matrix{promote_type(T1,T2)}
promote_rule{T1,S1,T2,S2<:AbstractMatrix{T2}}(::Type{S2},::Type{SparseMatrixCSC{T1,S1}}) = Matrix{promote_type(T1,T2)} should I make a PR? |
Revisiting old sparse issues. This does need the PR. |
7 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
vs in the dense case:
The text was updated successfully, but these errors were encountered: