Hi all,
Sorry to ask what is probably a very basic question, but I just downloaded Julia yesterday.
As a MATLAB user trying to see if Julia is for me, the following is very puzzling behavior to me. I would expect to be able to assign the a size[1] array of floats to a single element in another array of floats. The syntax I came up with to make this work is very very strange to me. Am I missing something obvious?
julia> foo=ones(10,1)
10x1 Float64 Array:
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
1.0
julia> foo'*foo
1x1 Float64 Array:
10.0
julia> bar=zeros(10,1)
10x1 Float64 Array:
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
0.0
julia> bar[1]=foo'*foo
ERROR: no method convert(Type{Float64},Array{Float64,2})
in setindex! at array.jl:409
julia> bar[1]=(foo'*foo)[1]
10.0
julia>
Thanks,
Jason