FWIW, I can't reproduce this in 0.4 on OSX:
Julia Version 0.4.0-dev+3099
Commit 3420529 (2015-02-03 20:18 UTC)
Platform Info:
System: Darwin (x86_64-apple-darwin14.1.0)
CPU: Intel(R) Core(TM) i7-3820QM CPU @ 2.70GHz
WORD_SIZE: 64
BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Sandybridge)
LAPACK: libopenblas
LIBM: libopenlibm
LLVM: libLLVM-3.3
On Wednesday, February 18, 2015 at 6:43:12 AM UTC-8, Tamas Papp wrote:
>
> Self-contained code here:
>
> --8<---------------cut here---------------start------------->8---
> function aggregator_matrix{T <: Integer}(a::Vector{T})
> n = length(a)
> (min_, k) = extrema(a)
> @assert 1 <= min_ "Aggregator index smaller than 1."
> sparse(a, 1:n, 1.0, k, n)
> end
>
> A = aggregator_matrix([3, 3, 2, 1, 1])
> p = [0.0, 0.138946, 0.0203463, 0.648933, 0.191775]
>
> full(A * spdiagm(p))
> full(A) * spdiagm(p)
> --8<---------------cut here---------------end--------------->8---
>
> bug occurs in debian's 0.3.5-1, not in Ubuntu's 0.3.5~utopic4, or the
> nighly 0.4.0-1820~ubuntu14.10.1. So now I am using the ubuntu version.
>
> If this is not known to be fixed, maybe worth adding to the test suite.
>
> Best,
>
> Tamas
>
> On Wed, Feb 18 2015, Andreas Noack <[email protected] <javascript:>>
> wrote:
>
> > I'm unable to reproduce this on 0.3.5, 0.3.7pre or master. How did you
> > construct A?
> >
> > 2015-02-18 9:17 GMT-05:00 Tamas Papp <[email protected] <javascript:>>:
> >
> >> Is this a bug, or am I missing something obvious?
> >>
> >> julia> versioninfo()
> >> Julia Version 0.3.5
> >> Platform Info:
> >> System: Linux (x86_64-linux-gnu)
> >> CPU: Intel(R) Core(TM) i7-3520M CPU @ 2.90GHz
> >> WORD_SIZE: 64
> >> BLAS: libblas
> >> LAPACK: liblapack
> >> LIBM: libopenlibm
> >> LLVM: libLLVM-3.5
> >>
> >> julia> A
> >> 3x5 sparse matrix with 5 Float64 entries:
> >> [3, 1] = 1.0
> >> [3, 2] = 1.0
> >> [2, 3] = 1.0
> >> [1, 4] = 1.0
> >> [1, 5] = 1.0
> >>
> >> julia> p
> >> 5-element Array{Float64,1}:
> >> 0.0
> >> 0.138946
> >> 0.0203463
> >> 0.648933
> >> 0.191775
> >>
> >> julia> full(A * spdiagm(p))
> >> 3x5 Array{Float64,2}:
> >> 0.0 0.0 0.0 0.648933 0.0
> >> 0.0 0.0 0.0203463 0.0 0.191775
> >> 0.0 0.138946 0.0 0.0 0.0
> >>
> >> julia> full(A) * spdiagm(p)
> >> 3x5 Array{Float64,2}:
> >> 0.0 0.0 0.0 0.648933 0.191775
> >> 0.0 0.0 0.0203463 0.0 0.0
> >> 0.0 0.138946 0.0 0.0 0.0
> >>
> >> Best,
> >>
> >> Tamas
> >>
>
>