It's not necessary because you can assign the result of reshape to the same
variable with virtually no overhead:
julia> a = rand(1000,100,100);
julia> @time a = reshape(a,prod(size(a)));
elapsed time: 1.1732e-5 seconds (336 bytes allocated)
--Peter
On Saturday, October 11, 2014 1:20:13 PM UTC-7, Stephan Buchert wrote:
>
> julia> a=[1 2; 3 4; 5 6]
> 3x2 Array{Int64,2}:
> 1 2
> 3 4
> 5 6
>
> julia> b=reshape(a, prod(size(a)));
>
> julia> b[3]=0
> 0
>
> julia> a
> 3x2 Array{Int64,2}:
> 1 2
> 3 4
> 0 6
>
>