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

Home » Public Forums » archive » Re: array handling
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: array handling [message #52124 is a reply to message #52123] Sat, 06 January 2007 08:15 Go to previous messageGo to previous message
Brian Larsen is currently offline  Brian Larsen
Messages: 270
Registered: June 2006
Senior Member
Something I have always wondered is the difference between using
finite() and just using ne?

As an example:
IDL> array = [ 1.0, 2.0, !Values.F_NAN, 4.0, !Values.F_NAN ]
IDL> Print, Where( NOT Float( Finite(array) ) )
2 4
IDL> print, where(array ne array)
2 4

What is the fundamental difference here? Speed? Style? or something
else entirely?

Cheers,

Brian







On Jan 6, 8:01 am, David Fanning <n...@dfanning.com> wrote:
> jochem.vere...@gmail.com writes:
>> I am a newbie in IDL. Although I cannot handle the following problem, I
>> am sure for the 'Masters' this is peanuts.
>
>> The problem:
>> I wish to filter an array of redundant data in one line. This is a part
>> of the line to be filtered:
>
>> -Inf -NaN -Inf 0.542373 2.39394 2.28125
>> 0.000000 0.000000 0.000000
>> 3.21053 1.21839 0.000000 -NaN 0.967213
>> 2.03448 0.724138 0.000000 0.000000 0.000000
>> -NaN
>
>> With WHERE I can get rid of the zeros, but I dont know how to exclude
>> the '-NaN' and '-Inf'.
>
>> Any help would be most welcome,Here is an article that will help:
>
> http://www.dfanning.com/tips/check_nan.html
>
> Cheers,
>
> David
> --
> David Fanning, Ph.D.
> Fanning Software Consulting, Inc.
> Coyote's Guide to IDL Programming:http://www.dfanning.com/
> Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Recorrido a Espa�a
Next Topic: Re: Recorrido a España

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

Current Time: Thu Oct 09 07:49:09 PDT 2025

Total time taken to generate the page: 0.48128 seconds