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

Home » Public Forums » archive » Initialize new variable array with nan or -9999 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: Initialize new variable array with nan or -9999 values [message #87654 is a reply to message #87653] Thu, 20 February 2014 20:11 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Heinz Stege writes:

> Yes, one should think so. But it is not true. "fltarr()-9999" ist
> faster than make_array():
>
> IDL> t0=systime(1) &for i=0,9 do a=fltarr(1000,1000,100)-9999.
> &print,systime(1)-t0 &help,a
> 1.8280001
> A FLOAT = Array[1000, 1000, 100]
> IDL> t0=systime(1) &for i=0,9 do
> a=make_array(1000,1000,100,value=-9999.) &print,systime(1)-t0 &help,a
> 2.7969999
> A FLOAT = Array[1000, 1000, 100]
> IDL> print,!version
> { x86 Win32 Windows Microsoft Windows 8.0.1 Oct 5 2010 32 64}

Oh, don't you just hate those guys who use their cell phones to fact
check everything you say! ;-)

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Problem with cgcmdwindow__define
Next Topic: Position, normal coordinates, and multiple images

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

Current Time: Wed Oct 08 18:04:53 PDT 2025

Total time taken to generate the page: 0.00401 seconds