-
-
Notifications
You must be signed in to change notification settings - Fork 28
Closed
Description
We noticed the problem today in SciML/ODE.jl#29. A boiled-down version is
B = Array(typeof([1.,2.]),2);
fill!(B,[1.,2.]);
Base.LinAlg.generic_matvecmul('N', [1. 1.], B)
which gives
WARNING: x::Number + A::Array is deprecated, use x .+ A instead.
in + at deprecated.jl:26
in generic_matvecmul at linalg/matmul.jl:310
in generic_matvecmul at linalg/matmul.jl:274
1-element Array{Any,1}:
[2.0,4.0]
The problem appears to be that generic_matvecmul
(and also generic_matmatmul
) uses zero(R)
to initialize the variable holding the sum. R
is some promoted type, which happens to be Any
in the case above and zero(Any)==0
. Adding the first product, which is a Vector
, triggers the depreciation warning.
Metadata
Metadata
Assignees
Labels
No labels