Good point. I suppose you do slicing along axes. — John
On Oct 9, 2014, at 7:29 PM, Stefan Karpinski <stefan.karpin...@gmail.com> wrote: > Well, I might argue that the slices are along the axes rather than them being > the same thing. > > >> On Oct 9, 2014, at 10:05 PM, John Myles White <johnmyleswh...@gmail.com> >> wrote: >> >> I’d suggest slices for consistency with the function mapslices. >> >> — John >> >>> On Oct 9, 2014, at 6:15 PM, Tim Holy <tim.h...@gmail.com> wrote: >>> >>> Would be great to have it clarified in the manual. >>> >>> I think I've brought this up before, and if there was a consensus I don't >>> recall it. In my opinion, the various usages of "dims" and "region" in the >>> manual and help are pretty confusing. It would be nice to standardize >>> terminology. I confess to being fond of talking about the "axes" of an >>> array, >>> but I am fine with other choices too. >>> >>> --Tim >>> >>>> On Friday, October 10, 2014 07:29:06 AM K Leo wrote: >>>> Thanks to both for explanations. "along dimensions in region" sounds >>>> pretty confusing to me. Can that be stated more clearly? Pardon my >>>> English. >>>> >>>> I guess this is what I wanted. >>>> >>>> julia> [std(A[i:i+9]) for i=1:length(A)-9] >>>> 91-element Array{Any,1}: >>>> 0.395761 >>>> 0.391694 >>>> 0.392545 >>>> 0.363307 >>> 0.392545 >>>> ⋮ >>>> 0.322292 >>>> 0.325662 >>>> 0.345799 >>>> >>>>> On 2014年10月10日 07:17, Simon Kornblith wrote: >>>>> Or alternatively: >>>>> >>>>> >>>>> std(reshape(A,10,div(length(A),10)),1) >>>>> >>>>> >>>>> Simon >>>>> >>>>> On Thursday, October 9, 2014 7:10:11 PM UTC-4, Patrick O'Leary wrote: >>>>> "optionally *along dimensions in region*" (emphasis mine). You are >>>>> attempting to read along the tenth dimension of the array. >>>>> >>>>> You're trying to split the array into groups of ten elements, it >>>>> sounds like. >>>>> >>>>> [std(A[10(n-1)+1:10n]) for n in 1:length(A)./10] >>>>> >>>>> On Thursday, October 9, 2014 5:56:01 PM UTC-5, K leo wrote: >>>>> I am hoping to get the std's of every 10 consecutive elements >>>>> in A. >>>>> >>>>> std(v[, region]) >>>>> Compute the sample standard deviation of a vector or array v, >>>>> optionally >>>>> along dimensions in region. The algorithm returns an estimator >>>>> of the >>>>> generative distribution’s standard deviation under the >>>>> assumption that >>>>> each entry of v is an IID drawn from that generative >>>>> distribution. This >>>>> computation is equivalent to calculating sqrt(sum((v - >>>>> mean(v)).^2) / >>>>> (length(v) - 1)). Note: Julia does not ignore NaN values in the >>>>> computation. For applications requiring the handling of >>>>> missing data, >>>>> the DataArray package is recommended. >>>>> >>>>>> On 2014年10月10日 06:49, Patrick O'Leary wrote: >>>>>> On Thursday, October 9, 2014 5:42:40 PM UTC-5, K leo wrote: >>>>>> julia> std(A, 10) >>>>>> >>>>>> A only has elements along the first dimension. What behavior >>>>> >>>>> do you >>>>> >>>>>> expect here? >>