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

Home » Public Forums » archive » operation with array of NaNs
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
operation with array of NaNs [message #52438] Wed, 31 January 2007 15:01
inardello is currently offline  inardello
Messages: 2
Registered: February 2007
Junior Member
Hello there,

I am quite new to IDL and found an interesting problem.

I have an array of elements (5x5).
All the elements in the array are NaN(s).

When I ask what is the number of locations (n_elements) where the
elements of this array are e.g.: "finite", the answer is "1".

If the array contains 1 finite elements (and the rest is Nan(s)), the
answer to the same question is still "1".
If the array contains 2 finite elements, the answer to the same
question is (finally..) "2".
> From there we progress normally.

So why can't I have an answer "0" when the array is only filled with
NaNs?

The same problem appears with other forms of analysis of the same
array. For example, "what is the number of elements greater than 10?"
The answer is still "1"

Thank you for your comments.

I->
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Filter image with moving window and averaging pixels
Next Topic: Re: colorbar - annotation isn't equally spaced...

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

Current Time: Wed Oct 08 17:44:07 PDT 2025

Total time taken to generate the page: 0.00453 seconds