lindahua / Devectorize.jl

A Julia framework for delayed expression evaluation
MIT License
115 stars 17 forks source link

BUG or user error? #40

Open sglyon opened 9 years ago

sglyon commented 9 years ago

Consider this example:

julia> x = rand(2, 10);

julia> bar = x[:,1] .- x
2x10 Array{Float64,2}:
 0.0  0.598825  0.259229  0.795142  0.922404  -0.0185507  0.34638   0.296326   0.206585  0.150938
 0.0  0.077272  0.184968  0.309547  0.612241   0.410853   0.370693  0.377315  -0.286029  0.236791

julia> @devec foo = x[:, 1] .- x
ERROR: DimensionMismatch("dimensions must match")
 in promote_shape at operators.jl:190
 in ewise_shape at /Users/sglyon/.julia/v0.4/Devectorize/src/meta_tools.jl:190
 in anonymous at no file

Am I doing something wrong here?

lindahua commented 9 years ago

The problem is that Devectorize is not supporting broadcasting yet.