Re: [julia-users] The sub function behaves differently in v0.3 and master

2015-02-07 Thread Daniel Casimiro
FWIW, I came up with the following snippet to get the behavior that I want: const nchans = size(userData.samples, 2) const samples = sub(userData.samples, tuple(rng, ntuple(nchans - 1, _ -:)...)) It appears to work. On Sunday, February 1, 2015 at 8:38:09 PM UTC-5, Tim Holy wrote: SubArrays

Re: [julia-users] The sub function behaves differently in v0.3 and master

2015-02-07 Thread Daniel Casimiro
A subtle difference for Julia v0.3: const nchans = size(userData.samples, 2) const samples = sub(userData.samples, tuple(rng, ntuple(nchans - 1, _ -:)...)...) because (I think) of https://github.com/JuliaLang/julia/issues/4869 On Saturday, February 7, 2015 at 1:44:28 PM UTC-5, Daniel Casimiro

[julia-users] The sub function behaves differently in v0.3 and master

2015-02-01 Thread Daniel Casimiro
Hi, I noticed that the sub function behaves differently in master and version 0.3.5, when handling data of type Array{Float64, 1}. I am not sure if the change is intentional. The following works as expected on Julia master: *julia* *sub([1.0; 2; 3; 4], 1:3, :)* but, fails in version 0.3.5

Re: [julia-users] The sub function behaves differently in v0.3 and master

2015-02-01 Thread Tim Holy
SubArrays have been entirely rewritten in 0.4, and can do quite a few tricks that the old ones can't. Changing the dimensionality of the view compared to the parent, as in your example, is one of them. Here's another example of something you simply can't do on 0.3: julia A = reshape(1:15, 3,