On Jun 7, 2012, at 4:32 AM, Paul Anton Letnes wrote:
>
> 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
On Thu, Jun 7, 2012 at 11:44 AM, Dave Hirschfeld
wrote:
> Paul Anton Letnes 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
> 2.999 or 2.3 doesn't make sense as
>> a
Paul Anton Letnes 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
2.999 or 2.3 doesn't make sense as
> an index.
>
> An alternative is to not refer to negative indices
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 "", line 1, in
> IndexError: index 3 is out of bounds for axis 0:
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 "", line 1, in
IndexError: index 3 is out of bounds for axis 0: [-3,3)
Ray Jones
___
Nu
On Tue, Jun 5, 2012 at 12:15 PM, Thouis Jones wrote:
> On Mon, Jun 4, 2012 at 11:49 PM, Nathaniel Smith wrote:
>> On Mon, Jun 4, 2012 at 10:00 PM, Thouis (Ray) Jones wrote:
>>> On Mon, Jun 4, 2012 at 4:27 PM, Thouis (Ray) Jones wrote:
I could look into this. There are only ~10 places the
On Mon, Jun 4, 2012 at 11:49 PM, Nathaniel Smith wrote:
> On Mon, Jun 4, 2012 at 10:00 PM, Thouis (Ray) Jones wrote:
>> On Mon, Jun 4, 2012 at 4:27 PM, Thouis (Ray) Jones wrote:
>>> I could look into this. There are only ~10 places the code generates
>>> this error, so it should be a pretty min
On Mon, Jun 4, 2012 at 10:00 PM, Thouis (Ray) Jones wrote:
> On Mon, Jun 4, 2012 at 4:27 PM, Thouis (Ray) Jones 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 was low, but not overly so.
On Mon, Jun 4, 2012 at 4:27 PM, Thouis (Ray) Jones wrote:
> On Fri, Jun 1, 2012 at 6:56 PM, Chris Withers wrote:
>> On 01/06/2012 16:39, Benjamin Root wrote:
>>>
>>>
>>> > >>> import numpy
>>> > >>> numpy.zeros(10)[-123]
>>> > Traceback (most recent call last):
>>> > File ""
On 4. juni 2012, at 16:27, Thouis (Ray) Jones wrote:
> On Fri, Jun 1, 2012 at 6:56 PM, Chris Withers wrote:
>> On 01/06/2012 16:39, Benjamin Root wrote:
>>>
>>>
>>> > >>> import numpy
>>> > >>> numpy.zeros(10)[-123]
>>> > Traceback (most recent call last):
>>> > File "",
On Fri, Jun 1, 2012 at 6:56 PM, Chris Withers wrote:
> On 01/06/2012 16:39, Benjamin Root wrote:
>>
>>
>> > >>> import numpy
>> > >>> numpy.zeros(10)[-123]
>> > Traceback (most recent call last):
>> > File "", line 1, in
>> > IndexError: index out of bounds
>> >
>>
On Fri, Jun 1, 2012 at 10:56 AM, Chris Withers wrote:
> On 01/06/2012 16:39, Benjamin Root wrote:
> >
> >
> > > >>> import numpy
> > > >>> numpy.zeros(10)[-123]
> > > Traceback (most recent call last):
> > > File "", line 1, in
> > > IndexError: index out of bounds
> >
On 01/06/2012 16:39, Benjamin Root wrote:
>
>
> > >>> import numpy
> > >>> numpy.zeros(10)[-123]
> > Traceback (most recent call last):
> > File "", line 1, in
> > IndexError: index out of bounds
> >
> > ...could say this:
> >
> > >>> numpy.zeros(10)[
>> On Fri, Jun 1, 2012 at 10:46 AM, Chris Withers
>> > Any reason why this:
>> >
>> > >>> import numpy
>> > >>> numpy.zeros(10)[-123]
>> > Traceback (most recent call last):
>> > File "", line 1, in
>> > IndexError: index out of bounds
>> >
>> > ...could say this:
>> >
>> > >>> numpy.zeros(
On Fri, Jun 1, 2012 at 9:14 AM, Nathaniel Smith wrote:
> On Fri, Jun 1, 2012 at 10:46 AM, Chris Withers
> wrote:
> > Hi All,
> >
> > Any reason why this:
> >
> > >>> import numpy
> > >>> numpy.zeros(10)[-123]
> > Traceback (most recent call last):
> > File "", line 1, in
> > IndexError: ind
On Fri, Jun 1, 2012 at 10:46 AM, Chris Withers wrote:
> Hi All,
>
> Any reason why this:
>
> >>> import numpy
> >>> numpy.zeros(10)[-123]
> Traceback (most recent call last):
> File "", line 1, in
> IndexError: index out of bounds
>
> ...could say this:
>
> >>> numpy.zeros(10)[-123]
> Traceb
Hi All,
Any reason why this:
>>> import numpy
>>> numpy.zeros(10)[-123]
Traceback (most recent call last):
File "", line 1, in
IndexError: index out of bounds
...could say this:
>>> numpy.zeros(10)[-123]
Traceback (most recent call last):
File "", line 1, in
IndexError: -123 is out o
17 matches
Mail list logo