On Sun, May 25, 2008 at 1:17 PM, Keith Goodman <[EMAIL PROTECTED]> wrote:
> On Sun, May 25, 2008 at 11:13 AM, Keith Goodman <[EMAIL PROTECTED]> wrote:
x = np.array([1.0])
np.isnan(x)
>> array([False], dtype=bool) # <- Expected
np.isnan(x,x)
>> array([ 0.]) # <- Surprise
On Sun, May 25, 2008 at 11:13 AM, Keith Goodman <[EMAIL PROTECTED]> wrote:
>>> x = np.array([1.0])
>>> np.isnan(x)
> array([False], dtype=bool) # <- Expected
>>> np.isnan(x,x)
> array([ 0.]) # <- Surprise (to me)
I guess this is not surprising since I'm asking isnan to put the
answer
>> x = np.array([1.0])
>> np.isnan(x)
array([False], dtype=bool) # <- Expected
>> np.isnan(x,x)
array([ 0.]) # <- Surprise (to me)
The same happens with isfinite, isinf, etc.
My use case (self.x is an array):
def isnan(self):
y = self.copy()
np.isnan(y.x, y.x)