Julia: `A_mul_B!(::Matrix, ::LowerTriangular)` is broken

Created on 7 Mar 2018  Â·  6Comments  Â·  Source: JuliaLang/julia

This works in 0.6.2 but not on v0.7 master:

julia> A = randn(10,10); B = randn(10,10);

julia> A_mul_B!(A, LowerTriangular(B))
┌ Warning: `A_mul_B!(A::StridedMatrix{T}, B::LowerTriangular{T, <:StridedMatrix}) where T <: BlasFloat` is deprecated, use `lmul!(A, B)` instead.
│   caller = top-level scope
â”” @ Core :0
ERROR: MethodError: no method matching lmul!(::Array{Float64,2}, ::LowerTriangular{Float64,Array{Float64,2}})
Closest candidates are:
  lmul!(::Number, ::Union{LowerTriangular, UpperTriangular}) at /Users/solver/Projects/julia7/usr/share/julia/site/v0.7/LinearAlgebra/src/triangular.jl:482
  lmul!(::Number, ::AbstractArray) at /Users/solver/Projects/julia7/usr/share/julia/site/v0.7/LinearAlgebra/src/generic.jl:83
  lmul!(::Tridiagonal, ::LinearAlgebra.AbstractTriangular) at /Users/solver/Projects/julia7/usr/share/julia/site/v0.7/LinearAlgebra/src/triangular.jl:514
  ...
Stacktrace:
 [1] A_mul_B!(::Array{Float64,2}, ::LowerTriangular{Float64,Array{Float64,2}}) at ./deprecated.jl:57
 [2] top-level scope
bug linear algebra

All 6 comments

I'm assuming it's meant to call rmul! not lmul!.

This appears to be on the wrong milestone.

It's actually fixed:

julia> A = randn(10,10); B = randn(10,10);

julia> rmul!(A, LowerTriangular(B))
10×10 Array{Float64,2}:
  3.98282     0.228975  -1.24769     1.46398     -2.89208     7.4309      -1.37582    3.1696     -0.958281   0.343001 
 -3.76952     2.22408    3.00661    -1.32612      3.2701     -5.92841      1.05929   -2.78789     0.348478  -0.325299 
 -0.0243392  -0.507352   0.690733   -1.48152      0.935714   -5.41262      0.862257  -3.97426     0.91897   -0.452275 
 -1.68911    -0.549256   1.70176     0.276268     2.39766    -1.94022      3.15423    0.360928    1.51496    0.134445 
  1.7892      1.33654   -0.161917   -0.602311    -1.19117    -0.571186    -1.73446    0.0108025  -0.660902  -0.0378151
  4.33327    -0.624454   1.32286     1.03966     -0.716799    5.90007     -2.0086     1.95895    -1.28044    0.173159 
 -2.90715     0.902785  -0.350289   -2.34967      0.0186438  -1.7355      -0.837439   0.9358     -0.428815   0.096832 
  3.09257    -1.61772    0.0431931   2.43877     -0.466894    3.61632     -0.084177   1.12149    -0.201973   0.128705 
  1.02871     0.91644   -0.669605   -3.21579     -1.95186    -3.88576      0.605894  -2.22021     1.10935   -0.224204 
  1.65718     3.5391     2.25737    -5.52781e-5   0.628435   -0.00177515  -1.63595    0.811675   -1.11147    0.0436612

I'll close this.

The deprecation of A_mul_B! is still wrong

Was this page helpful?
0 / 5 - 0 ratings