Re: [Numpy-discussion] better error message possible?

2012-06-07 Thread Thouis (Ray) Jones
I've opened a PR at https://github.com/numpy/numpy/pull/296 for discussion. A typical result np.zeros((3,3))[[1,2,3]] Traceback (most recent call last): File stdin, line 1, in module IndexError: index 3 is out of bounds for axis 0: [-3,3) Ray Jones

Re: [Numpy-discussion] better error message possible?

2012-06-07 Thread Paul Anton Letnes
On 7. juni 2012, at 10:30, Thouis (Ray) Jones wrote: I've opened a PR at https://github.com/numpy/numpy/pull/296 for discussion. A typical result np.zeros((3,3))[[1,2,3]] Traceback (most recent call last): File stdin, line 1, in module IndexError: index 3 is out of bounds for axis 0:

Re: [Numpy-discussion] better error message possible?

2012-06-07 Thread Thouis (Ray) Jones
On Thu, Jun 7, 2012 at 11:44 AM, Dave Hirschfeld dave.hirschf...@gmail.com wrote: Paul Anton Letnes paul.anton.letnes at gmail.com writes: I would prefer: IndexError: index 3 is out of bounds for axis 0: [-3,2] as I find the 3) notation a bit weird - after all, indices are not floats, so

Re: [Numpy-discussion] better error message possible?

2012-06-05 Thread Thouis Jones
On Mon, Jun 4, 2012 at 11:49 PM, Nathaniel Smith n...@pobox.com wrote: On Mon, Jun 4, 2012 at 10:00 PM, Thouis (Ray) Jones tho...@gmail.com wrote: On Mon, Jun 4, 2012 at 4:27 PM, Thouis (Ray) Jones tho...@gmail.com wrote: I could look into this.  There are only ~10 places the code generates

Re: [Numpy-discussion] better error message possible?

2012-06-05 Thread Thouis Jones
On Tue, Jun 5, 2012 at 12:15 PM, Thouis Jones thouis.jo...@curie.fr wrote: On Mon, Jun 4, 2012 at 11:49 PM, Nathaniel Smith n...@pobox.com wrote: On Mon, Jun 4, 2012 at 10:00 PM, Thouis (Ray) Jones tho...@gmail.com wrote: On Mon, Jun 4, 2012 at 4:27 PM, Thouis (Ray) Jones tho...@gmail.com

Re: [Numpy-discussion] better error message possible?

2012-06-04 Thread Thouis (Ray) Jones
On Fri, Jun 1, 2012 at 6:56 PM, Chris Withers ch...@simplistix.co.uk wrote: On 01/06/2012 16:39, Benjamin Root wrote:       import numpy       numpy.zeros(10)[-123]       Traceback (most recent call last):         File stdin, line 1, in module       IndexError: index out of bounds      

Re: [Numpy-discussion] better error message possible?

2012-06-04 Thread Paul Anton Letnes
On 4. juni 2012, at 16:27, Thouis (Ray) Jones wrote: On Fri, Jun 1, 2012 at 6:56 PM, Chris Withers ch...@simplistix.co.uk wrote: On 01/06/2012 16:39, Benjamin Root wrote: import numpy numpy.zeros(10)[-123] Traceback (most recent call last): File stdin, line

Re: [Numpy-discussion] better error message possible?

2012-06-04 Thread Thouis (Ray) Jones
On Mon, Jun 4, 2012 at 4:27 PM, Thouis (Ray) Jones tho...@gmail.com wrote: On Fri, Jun 1, 2012 at 6:56 PM, Chris Withers ch...@simplistix.co.uk wrote: On 01/06/2012 16:39, Benjamin Root wrote:       import numpy       numpy.zeros(10)[-123]       Traceback (most recent call last):        

Re: [Numpy-discussion] better error message possible?

2012-06-04 Thread Nathaniel Smith
On Mon, Jun 4, 2012 at 10:00 PM, Thouis (Ray) Jones tho...@gmail.com wrote: On Mon, Jun 4, 2012 at 4:27 PM, Thouis (Ray) Jones tho...@gmail.com wrote: I could look into this.  There are only ~10 places the code generates this error, so it should be a pretty minor change. My initial estimate

Re: [Numpy-discussion] better error message possible?

2012-06-03 Thread Charles R Harris
On Fri, Jun 1, 2012 at 10:56 AM, Chris Withers ch...@simplistix.co.ukwrote: On 01/06/2012 16:39, Benjamin Root wrote: import numpy numpy.zeros(10)[-123] Traceback (most recent call last): File stdin, line 1, in module IndexError: index out of

[Numpy-discussion] better error message possible?

2012-06-01 Thread Chris Withers
Hi All, Any reason why this: import numpy numpy.zeros(10)[-123] Traceback (most recent call last): File stdin, line 1, in module IndexError: index out of bounds ...could say this: numpy.zeros(10)[-123] Traceback (most recent call last): File stdin, line 1, in module IndexError:

Re: [Numpy-discussion] better error message possible?

2012-06-01 Thread Nathaniel Smith
On Fri, Jun 1, 2012 at 10:46 AM, Chris Withers ch...@simplistix.co.uk wrote: Hi All, Any reason why this:   import numpy   numpy.zeros(10)[-123] Traceback (most recent call last):   File stdin, line 1, in module IndexError: index out of bounds ...could say this:  

Re: [Numpy-discussion] better error message possible?

2012-06-01 Thread Benjamin Root
On Fri, Jun 1, 2012 at 9:14 AM, Nathaniel Smith n...@pobox.com wrote: On Fri, Jun 1, 2012 at 10:46 AM, Chris Withers ch...@simplistix.co.uk wrote: Hi All, Any reason why this: import numpy numpy.zeros(10)[-123] Traceback (most recent call last): File stdin, line 1, in

Re: [Numpy-discussion] better error message possible?

2012-06-01 Thread Chris Barker
On Fri, Jun 1, 2012 at 10:46 AM, Chris Withers ch...@simplistix.co.uk Any reason why this:   import numpy   numpy.zeros(10)[-123] Traceback (most recent call last):   File stdin, line 1, in module IndexError: index out of bounds ...could say this:   numpy.zeros(10)[-123]

Re: [Numpy-discussion] better error message possible?

2012-06-01 Thread Chris Withers
On 01/06/2012 16:39, Benjamin Root wrote: import numpy numpy.zeros(10)[-123] Traceback (most recent call last): File stdin, line 1, in module IndexError: index out of bounds ...could say this: numpy.zeros(10)[-123]