comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: TOTAL() and NaNs, again
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: TOTAL() and NaNs, again [message #83727] Tue, 26 March 2013 08:48 Go to previous message
Kenneth Bowman is currently offline  Kenneth Bowman
Messages: 86
Registered: November 2006
Member
On 2013-03-25 21:30:30 +0000, Fabien said:

> Dear IDLers,
>
> To be honest, this is described in the Doc: "Since the value NaN is
> treated as missing data, if Array contains only NaN values the TOTAL
> routine will return 0."
>
> But I don't see why it is so. This is not coherent with what one would
> expect TOTAL to do: the sum of all the elements in the array...
>
> Anyone to convince me that TOTAL() *has* to return 0 in this case?

When this was introduced I argued that it was implemented wrong.
(Others disagreed with me.) As it is, it nullifies the value of the
NAN keyword by requiring the user to check for the special case where
all of the elements are NANs.

So, most of the time I find the NAN keyword to be useless for TOTAL.

Ken Bowman
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Interpolation and creating profiles from contour maps.
Next Topic: IDL 8.2.2 and PLOT with NaN values

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Sat Oct 11 16:17:18 PDT 2025

Total time taken to generate the page: 0.31837 seconds