Re: [Numpy-discussion] Scipy 2017 NumPy sprint

2017-07-08 Thread Peter Creasey
> From: Marten van Kerkwijk > > Though based on my experience with Quantity, I'd also argue that the > more annoying problems are not so much with `ndarray` itself, but > rather with the helper functions. Just to give an alternative view - as another astronomer I would say that concerns about the

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. ___ NumPy-Discussion mailing lis

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

2017-07-08 Thread Jaime Fernández del Río
The last index is exclusive: [a:b] means a <= index < b. On Jul 8, 2017 10:20 AM, wrote: > Hi > > Once again I need your help to understand one topic concerning slicing > topic, or in other word I do not understand how it works in that particular > (but common) case; I’m trying to reassign the

Re: [Numpy-discussion] Scipy 2017 NumPy sprint

2017-07-08 Thread josef . pktd
On Fri, Jul 7, 2017 at 6:42 PM, Ryan May wrote: > On Fri, Jul 7, 2017 at 4:27 PM, Marten van Kerkwijk < > m.h.vankerkw...@gmail.com> wrote: > >> Hi All, >> >> I doubt I'm really the last one thinking ndarray subclassing is a good >> idea, but as that was stated, I feel I should at least pipe in.

[Numpy-discussion] Numpy arrays and slicing comprehension issue

2017-07-08 Thread paul . carrico
Hi Once again I need your help to understand one topic concerning slicing topic, or in other word I do not understand how it works in that particular (but common) case; I'm trying to reassign the 4 first values in an array: * If I use [:3] I'm expecting to have 4 values (index 0 to 3 i

Re: [Numpy-discussion] Scipy 2017 NumPy sprint

2017-07-08 Thread Marten van Kerkwijk
Hi Ryan, Indeed, the liberal use of `np.asarray` is one of the main reason the helper routines are relatively annoying. Of course, that is not an argument for using duck-types over subclasses: those wouldn't even survive `asanyarray` (which many numpy routines now have moved to). All the best, M