<div class="gmail_quote">2011/9/27 Zbigniew Jędrzejewski-Szmek <span dir="ltr"><<a href="mailto:zbyszek@in.waw.pl">zbyszek@in.waw.pl</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
On 09/22/2011 12:09 PM, Pauli Virtanen wrote:<br>
> Thu, 22 Sep 2011 08:12:12 +0200, Han Genuit wrote:<br>
> [clip]<br>
>> I also noticed that it does strange things when using a list:<br>
>><br>
>>>>> c[[True, False, True]]<br>
>> array([[3, 4, 5],<br>
>>         [0, 1, 2],<br>
>>         [3, 4, 5]])<br>
><br>
> It casts the list with booleans to an integer array. Probably shouldn't<br>
> work like that...<br>
Changing that would require looping over the list first to check if<br>
everything is an boolean, or maybe just looking at the first few<br>
elements. Either way pretty ugly. So I guess that the current (slightly<br>
surprising) behaviour has to stay.<br>
<br></blockquote><div><br>Ugly implementation is better than ugly behavior IMO.<br><br>-=- Olivier<br></div></div>