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

Home » Public Forums » archive » Re: Arrays with NaN values
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: Arrays with NaN values [message #41347 is a reply to message #41253] Tue, 05 October 2004 09:13 Go to previous message
Paul Van Delst[1] is currently offline  Paul Van Delst[1]
Messages: 1157
Registered: April 2002
Senior Member
Mark Hadfield wrote:
> David Fanning wrote:
>
>>
>> I think I would try something like this:
>>
>> index = Where(Finite(image) EQ 0, count)
>> IF count NE 0 THEN image[index] = 0
>
>
> Note that the first line could *not* be replaced by the (apparently
> reasonable)
>
> index = Where(NOT Finite(image), count)
>
> because the NOT operator and the WHERE function do not play well
> together. The reasons are explained here:
>
> http://www.dfanning.com/code_tips/bitwiselogical.html
>
> In IDL 6.0 the logical not operator, "~" operator was introduced to
> avoid this problem,

Man, the C-loving types really did a number on IDL. RSI musta hired a boatload of CS grads
from the same school or something to implement the OO stuff. :o) [and, just in case
anyone is irony impaired, yes, I am kidding]

> so the following would work
>
> index = Where(~Finite(image), count)

I realise "~" is a complement operator but when I look at the code above, I think "where
the elements of IMAGE are *approximately* finite" ..... huh?

Gosh, I have that old'n'crusty feeling coming on again. Back to DF's blog for some
restorative therapy......

paulv
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Map_grid options
Next Topic: General 3D graphics advise required

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

Current Time: Tue Dec 02 10:56:11 PST 2025

Total time taken to generate the page: 0.72308 seconds