the.bay.news

Inconsistent results using view()

Julia Programming Language
Inconsistent results using view()
I don’t understand why there would be any difference by using view(): julia> Random.seed!(1); julia> xhmat = randn(Float32, 10, 1000); julia> [sum(xhmat[d, :]) for d in 1:10] 10-element Vector{Float32}: 6.1436114 31.91372 9.005221 -40.03097 -48.17327 -6.9555407 35.577076 -33.41585 12.131447 -22.086914 julia> [sum(view(xhmat, d, :)) for d in 1:10] 10-element Vector{Float32}: 6.1436205 31.913723 9.005228 -40.030956 -48.173267 -6.9555435 35.577084 -33.41586 12...

0 comments

Sign in to join the discussion — your thebay.events account works here.

No comments yet.