John Hunter wrote:
> A colleague of mine just asked for help with a pesky bug that turned
> out to be caused by his use of a list of booleans rather than an array
> of booleans as his logical indexing mask. I assume this is a feature
> and not a bug, but it certainly surprised him:
>
> In [58]: ma
On Nov 6, 2007 7:22 AM, Lisandro Dalcin <[EMAIL PROTECTED]> wrote:
> Mmm...
> It looks as it 'mask' is being inernally converted from
> [True, False, False, False, True]
> to
> [1, 0, 0, 0, 1]
>
> so your are finally getting
>
> x[1], x[0], x[0], x[0], x[1]
That would be my guess as well. And, i
On Nov 6, 2007 8:22 AM, Lisandro Dalcin <[EMAIL PROTECTED]> wrote:
> Mmm...
> It looks as it 'mask' is being inernally converted from
> [True, False, False, False, True]
> to
> [1, 0, 0, 0, 1]
Yep, clearly. The question is: is this the desired behavior because
it leads to a "silent failure" for p
Mmm...
It looks as it 'mask' is being inernally converted from
[True, False, False, False, True]
to
[1, 0, 0, 0, 1]
so your are finally getting
x[1], x[0], x[0], x[0], x[1]
On 11/5/07, John Hunter <[EMAIL PROTECTED]> wrote:
> A colleague of mine just asked for help with a pesky bug that turned
A colleague of mine just asked for help with a pesky bug that turned
out to be caused by his use of a list of booleans rather than an array
of booleans as his logical indexing mask. I assume this is a feature
and not a bug, but it certainly surprised him:
In [58]: mask = [True, False, False, Fals