On Tue, Mar 10, 2009 at 2:49 PM, Charles R Harris <charlesr.har...@gmail.com
> wrote:

>
>
> On Tue, Mar 10, 2009 at 3:16 PM, Stéfan van der Walt <ste...@sun.ac.za>wrote:
>
>> 2009/3/10 Pauli Virtanen <p...@iki.fi>:
>> > Nonzero Python object, hence True. Moreover, it's also True in Python:
>>
>> Also in C:
>>
>> #include <math.h>
>> #include <stdio.h>
>>
>> int main() {
>>    double nan = sqrt(-1);
>>    printf("%f\n", nan);
>>    printf("%i\n", bool(nan));
>>    return 0;
>> }
>>
>> $ ./nan
>> nan
>> 1
>>
>
> So resolved, it is True.
>

I appear to be late to the party, but IMO it should raise an exception in
those cases where it's feasible to do so.


-- 
.  __
.   |-\
.
.  tim.hochb...@ieee.org
_______________________________________________
Numpy-discussion mailing list
Numpy-discussion@scipy.org
http://mail.scipy.org/mailman/listinfo/numpy-discussion

Reply via email to