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

Home » Public Forums » archive » n_elements and NaN
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: n_elements and NaN [message #74632 is a reply to message #74563] Wed, 26 January 2011 09:20 Go to previous messageGo to previous message
R.Bauer is currently offline  R.Bauer
Messages: 1424
Registered: November 1998
Senior Member
Am 26.01.2011 09:15, schrieb alx:
> On 25 jan, 21:26, Reimar Bauer <R.Ba...@fz-juelich.de> wrote:
>> Just recognized some fun with NaN or more arguments against NaN.
>>
>> n_elements haven't a NaN keyword
>>
>> Reimar
>
> Why should it do ?
> "N_elements(x)" is the old way for "(Size(x))[-1]" or "Size(x,/
> N_ELEMENTS)".
> What you want is "where(finite(x), COUNT=number_of_finite_elements,
> NCOMP=number_of_nan)".
> The two statements adress two different things: the x size and x
> content.
> alx.


This is only a workaround. Until NaN is not completly supported we will
always have risks to use it. Or having more complicated code as usually
needed. If you for example expect only to have Long values you would
never expect NaN numbers there and the data of type float.



Reimar
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: IDL books for beginners
Next Topic: Speed Improvement

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

Current Time: Sat Oct 11 15:00:28 PDT 2025

Total time taken to generate the page: 0.87886 seconds