[SciPy-User] How to ignore NaN values and -32767 in numpy array
questions anon
questions.anon@gmail....
Mon Aug 22 18:00:31 CDT 2011
Thank you, that is good to know, but that is not the case for this. I know I
have blank data or something in a couple of sections and when I choose to
print around those figures I still end up with what happens below (shown
again).
[[-- -- -- ..., -- -- --]
[-- -- -- ..., -- -- --]
[-- -- -- ..., -- -- --]
...,
And then when I make this into one big array these turn into
[ -3.27670000e+04 -3.27670000e+04 -3.27670000e+04 ..., -3.27670000e+04
-3.27670000e+04 -3.27670000e+04]
Is there a way to identify these blanks and ignore them from the analyses?
On Sat, Aug 20, 2011 at 3:18 AM, Robert Kern <robert.kern@gmail.com> wrote:
> On Fri, Aug 19, 2011 at 00:01, questions anon <questions.anon@gmail.com>
> wrote:
> > Thank you, what you suggested worked but now I don't think that is my
> > problem.
> > Within the dataset I am trying to calculate the mean from it appears
> there
> > are some hours with no data, the output is:
> > [[[-- -- -- ..., -- -- --]
> > [-- -- -- ..., -- -- --]
> > [-- -- -- ..., -- -- --]
> > ...,
> > [-- -- -- ..., -- -- --]
> > [-- -- -- ..., -- -- --]
> > [-- -- -- ..., -- -- --]]]
> > So I would assume these would be ignored when I calculate the mean but
> when
> > I make all my files/times into one big array these blanks turn into
> -32767.
> > Is there some way to avoid this?
>
> This is just how large arrays get summarized when printed. The data is
> all there. You can control how this summarization happens using the
> threshold parameter to numpy.set_printoptions():
>
>
> http://docs.scipy.org/doc/numpy/reference/generated/numpy.set_printoptions.html
>
> --
> 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 attempt to interpret it as
> though it had an underlying truth."
> -- Umberto Eco
> _______________________________________________
> SciPy-User mailing list
> SciPy-User@scipy.org
> http://mail.scipy.org/mailman/listinfo/scipy-user
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-user/attachments/20110823/87009df1/attachment.html
More information about the SciPy-User
mailing list