to, 2008-05-29 kello 10:53 -0700, Keith Goodman kirjoitti:
> On Thu, May 29, 2008 at 9:26 AM, Stéfan van der Walt <[EMAIL PROTECTED]>
> wrote:
> > 2008/5/23 Keith Goodman <[EMAIL PROTECTED]>:
> >> On Fri, May 23, 2008 at 11:44 AM, Robert Kern <[EMAIL PROTECTED]> wrote:
[clip]
> >> That makes sense
On Thu, May 29, 2008 at 9:26 AM, Stéfan van der Walt <[EMAIL PROTECTED]> wrote:
> 2008/5/23 Keith Goodman <[EMAIL PROTECTED]>:
>> On Fri, May 23, 2008 at 11:44 AM, Robert Kern <[EMAIL PROTECTED]> wrote:
>>> On Fri, May 23, 2008 at 12:22 PM, Keith Goodman <[EMAIL PROTECTED]> wrote:
>>>
But the
On Thu, May 29, 2008 at 9:26 AM, Stéfan van der Walt <[EMAIL PROTECTED]> wrote:
> 2008/5/23 Keith Goodman <[EMAIL PROTECTED]>:
>> On Fri, May 23, 2008 at 11:44 AM, Robert Kern <[EMAIL PROTECTED]> wrote:
>>> On Fri, May 23, 2008 at 12:22 PM, Keith Goodman <[EMAIL PROTECTED]> wrote:
>>>
But the
2008/5/23 Keith Goodman <[EMAIL PROTECTED]>:
> On Fri, May 23, 2008 at 11:44 AM, Robert Kern <[EMAIL PROTECTED]> wrote:
>> On Fri, May 23, 2008 at 12:22 PM, Keith Goodman <[EMAIL PROTECTED]> wrote:
>>
>>> But the first example
>>>
> x = mp.matrix([[mp.nan]])
> x
>>> matrix([[ NaN]])
>
On Fri, May 23, 2008 at 11:44 AM, Robert Kern <[EMAIL PROTECTED]> wrote:
> On Fri, May 23, 2008 at 12:22 PM, Keith Goodman <[EMAIL PROTECTED]> wrote:
>
>> But the first example
>>
x = mp.matrix([[mp.nan]])
x
>> matrix([[ NaN]])
x.all()
>> True
x.any()
>> True
>>
>> is stil
On Fri, May 23, 2008 at 12:22 PM, Keith Goodman <[EMAIL PROTECTED]> wrote:
> But the first example
>
>>> x = mp.matrix([[mp.nan]])
>>> x
> matrix([[ NaN]])
>>> x.all()
> True
>>> x.any()
> True
>
> is still surprising.
On non-boolean arrays, .all() and .any() check each element to see if
it
On Fri, May 23, 2008 at 10:16 AM, Keith Goodman <[EMAIL PROTECTED]> wrote:
> I'm writing unit tests for a module that contains matrices. I was
> surprised that these are True:
>
>>> import numpy.matlib as mp
>>> x = mp.matrix([[mp.nan]])
>>> x.any()
> True
>>> x.all()
> True
>
> My use case is
I'm writing unit tests for a module that contains matrices. I was
surprised that these are True:
>> import numpy.matlib as mp
>> x = mp.matrix([[mp.nan]])
>> x.any()
True
>> x.all()
True
My use case is (x == y).all() where x and y are the same matrix except
that x contains one NaN. Certianl