-
Notifications
You must be signed in to change notification settings - Fork 87
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
Use of promote_op problematic #396
Comments
I agree that we should fix this. It should be fairly straight forward if we use function Base.promote_rule(::Type{StateSpace{TE, T1, MT}}, ::Type{T2}) where {TE, T1, MT, T2<:Number}
NewMT = Base.promote_op(*, MT, T2)
StateSpace{TE, eltype(NewMT), NewMT}
end |
Didn't we say that we should get rid of the Matrix type argument? Which would resolve this? |
I assume we would have a similar problem for the corresponding *(sys::ST, n::Number) where ST <: AbstractStateSpace = StateSpace(sys.A, sys.B, sys.C*n, sys.D*n, sys.timeevol)
/(sys::ST, n::Number) where ST <: AbstractStateSpace = ST(sys.A, sys.B, sys.C/n, sys.D/n, sys.timeevol) and I can't see directly if we catch the matrix case anywhere. |
See discussion in JuliaLang/julia#38436 (comment)
We should try to rid ourselves of the use of
promote_op
to avoid future situations like this.The text was updated successfully, but these errors were encountered: