BTW, I found nanmean and nanstd in scipy.stats.stats will be good for
my case too.
On 6/25/07, Charles R Harris <[EMAIL PROTECTED]> wrote:
>
>
> On 6/25/07, Giorgio F. Gilestro <[EMAIL PROTECTED]> wrote:
> > Masked array seems definitely to be the way to go, thanks a lot.
> >
> > I must say that
On 6/25/07, Giorgio F. Gilestro <[EMAIL PROTECTED]> wrote:
Masked array seems definitely to be the way to go, thanks a lot.
I must say that this entire issue doesn't make much sense to me: my
understanding is the a NaN is different from an INF, therefore one
would assume that really there is no
Giorgio F. Gilestro wrote:
> Masked array seems definitely to be the way to go, thanks a lot.
>
> I must say that this entire issue doesn't make much sense to me: my
> understanding is the a NaN is different from an INF, therefore one
> would assume that really there is no reason why a not-number
Masked array seems definitely to be the way to go, thanks a lot.
I must say that this entire issue doesn't make much sense to me: my
understanding is the a NaN is different from an INF, therefore one
would assume that really there is no reason why a not-number should
not be ignored by default by a
On Monday 25 June 2007 14:15:20 Giorgio F. Gilestro wrote:
> Thanks.
> Actually those I care the most are average and std.
> Is there a way to know the number of NaN in an array?
Giorgio,
You could use:
numpy.isnan(x).sum()
But once again
masked arrays were designed to handle this kind of situa
Giorgio F. Gilestro wrote:
> I find myself in a situation where an array may contain not-Numbers
> that I set as NaN.
> Yet, whatever operation I do on that array( average, sum...) will
> threat the NaN as infinite values rather then ignoring them as I'd
> like it'd do.
>
> Am I missing something?
Giorgio F. Gilestro wrote:
> Thanks.
> Actually those I care the most are average and std.
> Is there a way to know the number of NaN in an array?
isnan(a).sum()
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad att
Thanks.
Actually those I care the most are average and std.
Is there a way to know the number of NaN in an array?
On 6/25/07, Timothy Hochberg <[EMAIL PROTECTED]> wrote:
>
>
>
> On 6/25/07, Giorgio F. Gilestro <[EMAIL PROTECTED]> wrote:
> > I find myself in a situation where an array may contai
On 6/25/07, Giorgio F. Gilestro <[EMAIL PROTECTED]> wrote:
I find myself in a situation where an array may contain not-Numbers
that I set as NaN.
Yet, whatever operation I do on that array( average, sum...) will
threat the NaN as infinite values rather then ignoring them as I'd
like it'd do.
I find myself in a situation where an array may contain not-Numbers
that I set as NaN.
Yet, whatever operation I do on that array( average, sum...) will
threat the NaN as infinite values rather then ignoring them as I'd
like it'd do.
Am I missing something? Is this a bug or a feature? :-)
10 matches
Mail list logo