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

Home » Public Forums » archive » Filtering out NaNs
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: Filtering out NaNs [message #8529 is a reply to message #8528] Wed, 19 March 1997 00:00 Go to previous messageGo to previous message
steinhh is currently offline  steinhh
Messages: 260
Registered: June 1994
Senior Member
In article <Iarla-1903971745010001@eorcu4.ch.cam.ac.uk>, Iarla@atm.ch.cam.ac.uk (Iarla Kilbane-Dawe) writes:
|> Hello,
|>
|> There are some NaNs in my data which keep making my code fall over. I'd
|> like to either filter them out or avoid them in the calculation, but doing
|> something like
|>
|> a(where(a eq !values.f_nan) = missing_flag
|>
|> doesn't work. Does anyone have any suggestions?
|>

NaNs are characterized by the fact that they are *not* equal
to any number (that's what it says, isn't it :-)

In fact, it's not even equal to itself - and this is the distinguishing
feature that must be used to pick them out. I.e.,

a(where(a ne a)) = missing_flag

Stein Vidar
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: RSI and the 24. Tagname...
Next Topic: ANY LINUX IDL USERS?

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

Current Time: Tue Dec 02 23:52:00 PST 2025

Total time taken to generate the page: 0.71470 seconds