Re: [Numpy-discussion] Proposal of timeline for dropping Python 2.7 support

2017-11-13 Thread Daπid
On 10 November 2017 at 23:03, Robert McLeod wrote: > E.g. in `requirements.txt`: > > numpy;python_version>"3.0" > numpylts; python_version<"3.0" > > In both cases you still call `import numpy` in the code. > For this to be efficient, it should be done soon enough to

Re: [Numpy-discussion] MATLAB to Numpy

2017-10-21 Thread Daπid
On 21 October 2017 at 22:32, Eric Wieser wrote: > David, that doesn’t work, because np.cumsum(mask)[mask] is always equal > to np.arange(mask.sum()) + 1. Robert’s answer is correct. > Of course, you are right. It makes sense in my head now.

Re: [Numpy-discussion] Numpy arrays and slicing comprehension issue

2017-07-08 Thread Daπid
On 8 July 2017 at 13:03, Jaime Fernández del Río wrote: > The last index is exclusive: > [a:b] means a <= index < b. > And the consequence is that the length of your array is b - a, so [:3] gives you the first 3 values. ___