Re: [julia-users] Re: reinterpret SubArray

2015-08-09 Thread Jeffrey Sarnoff
thank you for the information On Sunday, August 9, 2015 at 11:13:24 PM UTC-4, Yichao Yu wrote: > > On Sun, Aug 9, 2015 at 11:08 PM, Jeffrey Sarnoff > > wrote: > > here is an example of reinterpreting a subarray in v0.4: > > > > ```julia > > julia> a=Int8[1,2,3,4] > > 4-element Array{Int8,1}:

[julia-users] Re: reinterpret SubArray

2015-08-09 Thread Jeffrey Sarnoff
(mistyped -- here is the msg) Just to clarify, your note is about subarrays per se. Here is an example of reinterpreting a subselected vector in v0.4. It is the use of `sub` in this context that generates an error: julia> a=Int8[1,2,3,4];print(a) Int8[1,2,3,4] julia> b=reinterpret(Uint8,a[2:3]);pr

Re: [julia-users] Re: reinterpret SubArray

2015-08-09 Thread Yichao Yu
On Sun, Aug 9, 2015 at 11:08 PM, Jeffrey Sarnoff wrote: > here is an example of reinterpreting a subarray in v0.4: > > ```julia > julia> a=Int8[1,2,3,4] > 4-element Array{Int8,1}: > 1 > 2 > 3 > 4 > > julia> b=reinterpret(Uint8,a) > 4-element Array{UInt8,1}: > 0x01 > 0x02 > 0x03 > 0x04 > >

[julia-users] Re: reinterpret SubArray

2015-08-09 Thread Jeffrey Sarnoff
here is an example of reinterpreting a subarray in v0.4: ```julia julia> a=Int8[1,2,3,4] 4-element Array{Int8,1}: 1 2 3 4 julia> b=reinterpret(Uint8,a) 4-element Array{UInt8,1}: 0x01 0x02 0x03 0x04 julia> b=reinterpret(Uint8,a[2:3]) 2-element Array{UInt8,1}: 0x02 0x03 ``` On Sunday, A