<div dir="ltr">Given someone who often finds himself in shoes similar to Alan's, at least with regard to python, the syntax of x(-1) often slips through my fingertips in NCL as well.<div><br></div><div>I also can't think of any immediate downsides, as I believe there is no acceptable or legal use of negative non-coordinate indices in NCL currently, and I would think no reasonably constructed code would be 'dependent' on errors thrown by attempting to use such indices.</div><div><br></div><div>Lastly, there are a number of times in which I've used syntax such as x(0:dimsizes(x)-2), which, perhaps unintuitively, reads all but the last 1 item.</div><div><br></div><div>Just consider this another vote in favor, pending any future discovery of downsides.</div><div><br></div><div>Thanks for considering...</div><div><br></div><div><br></div><div>Kyle</div></div><br><div class="gmail_quote"><div dir="ltr">On Tue, May 10, 2016 at 7:17 PM David Brown <<a href="mailto:dbrown@ucar.edu">dbrown@ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">I agree that negative indexes would be great and we don't know what<br>
the downsides are either, although we would probably find out if we<br>
tried to implement them.<br>
-dave<br>
<br>
On Tue, May 10, 2016 at 2:41 PM, Alan Brammer <<a href="mailto:abrammer@albany.edu" target="_blank">abrammer@albany.edu</a>> wrote:<br>
> Not sure if this has been brought up before but I’d really like the ability to fetch the last index of an array using x(-1), or similarly the last n of the array x(-n:)<br>
><br>
> Being in a mostly javascript/python world outside of NCL negative indexes have been quite useful.<br>
><br>
> Any plans or possibility of this becoming a thing, or are there downsides I’m not thinking of?<br>
><br>
> Thanks,<br>
><br>
> Alan<br>
> _______________________________________________<br>
> ncl-talk mailing list<br>
> <a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
> List instructions, subscriber options, unsubscribe:<br>
> <a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="http://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
</blockquote></div>