Did something change with @test or round(Float64)?

137 views
Skip to first unread message

Seth

unread,
Jun 30, 2015, 11:31:58 AM6/30/15
to julia...@googlegroups.com
Trying to get Travis to behave, but I'm running into a new (for me) error message. Does anyone have any ideas?  That should be rounding a Float64 to three decimal places. It works on 0.4.0-dev+5008.

The line is

@test round(pagerank(g5)[3],3) == 0.318

(I don't know where those extra parens (in the output below) are coming from, but on my system it works. It's just not working on Travis.)



ERROR: LoadError: LoadError: test error in expression: round((pagerank(g5))[3],3) == 0.318

DimensionMismatch("")

Seth

unread,
Jun 30, 2015, 12:06:05 PM6/30/15
to julia...@googlegroups.com
Following up, it's not with @test, it's with the pagerank code itself:

ERROR: LoadError: LoadError: DimensionMismatch("")

in * at sparse/linalg.jl:104

in * at linalg/matmul.jl:70

in pagerank at /home/travis/.julia/v0.4/LightGraphs/src/centrality/pagerank.jl:18


This works in 0.4.0-dev+5008 but is broken in nightly.

Seth

unread,
Jun 30, 2015, 1:07:33 PM6/30/15
to julia...@googlegroups.com
Following up again: it appears that x::Vector * A::SparseMatrixCSC was removed via a commit last week. Is anyone aware of a workaround?

Viral Shah

unread,
Jul 1, 2015, 8:09:32 AM7/1/15
to julia...@googlegroups.com, catc...@bromberger.com
I believe that Andreas did this to make it consistent with the dense case. You want to do:

julia> ones(10)'*sprand(10,10,0.1)
1x10 Array{Float64,2}:
 0.871294  0.820477  0.969049  2.02607  …  0.74965  0.989042  0.0  0.991852

Both of these do not work now:

julia> ones(10)*rand(10,10)
ERROR: DimensionMismatch("A has dimensions (10,1) but B has dimensions (10, 10)")
 in gemm_wrapper! at linalg/matmul.jl:295
 in * at linalg/matmul.jl:70

julia> ones(10)*sprand(10,10,0.1)
ERROR: DimensionMismatch("")
 in * at sparse/linalg.jl:104
 in * at linalg/matmul.jl:70


-viral
Reply all
Reply to author
Forward
0 new messages