Right. The shortest I could come up with to circumvent this problem is:

*map(x->x+1, copy([[1,1] for i in 1:5]))*


-erik

On Sat, Dec 5, 2015 at 5:37 AM, James Gilbert <[email protected]> wrote:

> You're making a 2D array, for which there is a dot add method. Chris, the
> OP, is making an array of arrays. I wonder if that is really what he wants?
>
> *julia> **a = fill(1, 5,2)*
>
> *5x2 Array{Int64,2}:*
>
> * 1  1*
>
> * 1  1*
>
> * 1  1*
>
> * 1  1*
>
> * 1  1*
>
>
> *julia> **a + 1*
>
> *5x2 Array{Int64,2}:*
>
> * 2  2*
>
> * 2  2*
>
> * 2  2*
>
> * 2  2*
>
> * 2  2*
>
>


-- 
Erik Schnetter <[email protected]>
http://www.perimeterinstitute.ca/personal/eschnetter/

Reply via email to