On Sun, Sep 13, 2009 at 05:30, Robert wrote:
> Neil Martinsen-Burrell wrote:
>> On 2009-09-07 07:11 , Robert wrote:
>>> Is there a reason why ndarray truth tests (except scalars)
>>> deviates from the convention of other Python iterables
>>> list,array.array,str,dict,... ?
>>>
>>> Furthermore ther
On Sun, Sep 13, 2009 at 9:05 AM, Alan G Isaac wrote:
> On 9/13/2009 7:46 AM, Robert wrote:
>> 2 ways seem to be consistently Pythonic and logical: "size>
>> 0"; or "any(a)" (*); and the later option may be more 'numerical'.
>
> Well, *there's* the problem.
>
> As a user I have felt more than once
On 9/13/2009 7:46 AM, Robert wrote:
> 2 ways seem to be consistently Pythonic and logical: "size>
> 0"; or "any(a)" (*); and the later option may be more 'numerical'.
Well, *there's* the problem.
As a user I have felt more than once that a
length based test, like other containers, would
be natura
Robert wrote:
> Neil Martinsen-Burrell wrote:
>> On 2009-09-07 07:11 , Robert wrote:
>>> Is there a reason why ndarray truth tests (except scalars)
>>> deviates from the convention of other Python iterables
>>> list,array.array,str,dict,... ?
>>>
>>> Furthermore there is a surprising strange except
Neil Martinsen-Burrell wrote:
> On 2009-09-07 07:11 , Robert wrote:
>> Is there a reason why ndarray truth tests (except scalars)
>> deviates from the convention of other Python iterables
>> list,array.array,str,dict,... ?
>>
>> Furthermore there is a surprising strange exception for arrays
>> with
On 2009-09-07 07:11 , Robert wrote:
> Is there a reason why ndarray truth tests (except scalars)
> deviates from the convention of other Python iterables
> list,array.array,str,dict,... ?
>
> Furthermore there is a surprising strange exception for arrays
> with size 1 (!= scalars).
Historically, n
Is there a reason why ndarray truth tests (except scalars)
deviates from the convention of other Python iterables
list,array.array,str,dict,... ?
Furthermore there is a surprising strange exception for arrays
with size 1 (!= scalars).
I often run into exceptions and unexpected bahavior like sh