On Saturday, April 2, 2016 at 1:55:55 PM UTC+2, Spiritus Pap wrote: > > A simple example why it makes my *life hard*: Assume there is an array of > size 100, and i want to take the i_th portion of it out of n. This is a > common scenario for research-code, at least for me and my friends. > In python: > a[i*100/n:(i+1)*100/n] > In julia: > a[1+div(i*100,n):div((i+1)*100,n)] > > A lot more cumbersome in julia, and it is annoying and unattractive. This > is just a simple example. >
Python 3.5 a[i*len(a)//n:(i+1)*len(a)//n] Julia: a[1+i*end÷5:(i+1)end÷5]