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
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.
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.
___