Le lundi 05 octobre 2015 à 09:12 -0700, [email protected] a écrit : > What about negative indices for reverse selection for example x[-[1, > 3]] is everything but the first and third element? The plan is to use a special "negated index" type instead, which would be clearer and more flexible (e.g. with non-numeric indices). See https://github.com/JuliaLang/julia/issues/1032
Regards > DP > > On Monday, October 5, 2015 at 4:49:39 PM UTC+1, Mark Sherlock wrote: > > Yeah thanks, two-based indexing is not particularly useful on its > > own...I think until arbitrary indexing is either in the standard > > release or very simple to implement with a library, > > most people I mention won't be motivated to switch.... > > > > On Tuesday, 29 September 2015 22:29:01 UTC+1, Luke Stagner wrote: > > > Nice to see more plasma physicists using Julia. > > > > > > > a=0.0 > > > > > > > You could just do > > > a[:] = 0.0 > > > > > > to set all the elements to zero or you could do > > > a=zeros(n) > > > > > > In regards to the negative indexing I think that while negative > > > indexing may not be a part of base you should be able to > > > replicate the effect with a package e.g. > > > https://github.com/simonster/TwoBasedIndexing.jl > > >
