Apologies, newbie to Julia here.  

I'm trying to use ArrayViews and ran into simple problem, where only the 
simplest setindex! usage (1 entry) works with a view, and anything 
involving more than one entry does not:

*julia> **x = ones(4)*

*4-element Array{Float64,1}:*

* 1.0*

* 1.0*

* 1.0*

* 1.0*


*julia> **y=view(x,:)*

*4-element ContiguousView{Float64,1,Array{Float64,1}}:*

* 1.0*

* 1.0*

* 1.0*

* 1.0*


*julia> **x[1:2]=5 # ok*

*5*


*julia> **y[1]=5 # ok*

*5*


*julia> **y[1:2]=6 # not ok*

*ERROR: `setindex!` has no method matching 
setindex!(::ContiguousView{Float64,1,Array{Float64,1}}, ::Int64, 
::UnitRange{Int64})*



(I realize that there was a previous post related, but for complex 
setindex! use.  This one is very simple and I'd think should work?)

cheers,
-yw

Reply via email to