<div dir="ltr"><div class="gmail_extra">After more thought (since you have freedom of redesigning from scratch), how about this:</div><div class="gmail_extra"><br></div><div class="gmail_extra"><a href="https://docs.google.com/document/d/1cEf8AynZEZxlTENJx1i4w1GTB481bbc4iUbUeJT00-U/edit#heading=h.uxrd8sd74w8r">https://docs.google.com/document/d/1cEf8AynZEZxlTENJx1i4w1GTB481bbc4iUbUeJT00-U/edit#heading=h.uxrd8sd74w8r</a></div><div class="gmail_extra"><br></div><div class="gmail_extra"><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Jan 8, 2016 at 11:00 PM, Ilya Yaroshenko via Digitalmars-d <span dir="ltr"><<a href="mailto:digitalmars-d@puremagic.com" target="_blank">digitalmars-d@puremagic.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">On Saturday, 9 January 2016 at 06:20:46 UTC, Ilya wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Saturday, 9 January 2016 at 00:26:42 UTC, Timothee Cour wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
i wrote my own tensor library a while ago and it allows the more convenient matlab/python+numpy like syntax:<br>
<br>
a[ _, 9, R(2, $, -3)]<br>
these are allowed:<br>
R() or _: full range for an index<br>
R(a,b): a..b<br>
R(a,b,s): when s>0, iota(a,b,s)<br>
R(a,b,s): when s<0, iota(a,b,-s).reverse<br>
<br>
Could we have this in ndslice?<br>
</blockquote>
<br>
<br>
Is `a[ _, 9, R(2, $, -3)]`<br>
<br>
equals to<br>
<br>
`a[0..$, 9, 2..$].reversed!2.strided!2(3)`<br>
or<br>
`a[0..$, 9, 2..$].strided!2(3).reversed!2`<br>
?<br>
</blockquote>
<br></div></div>
My bad. You have already wrote `iota(a,b,-s).reverse`.<br>
<br>
We can test this kind of syntax in Mir first <a href="https://github.com/DlangScience/mir" rel="noreferrer" target="_blank">https://github.com/DlangScience/mir</a><span class="HOEnZb"><font color="#888888"><br>
--Ilya<br>
</font></span></blockquote></div><br></div>