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

Home » Public Forums » archive » Re: Arrays suck. Loops rock.
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 suck. Loops rock. [message #43047 is a reply to message #42948] Tue, 08 March 2005 12:12 Go to previous messageGo to previous message
Benjamin Hornberger is currently offline  Benjamin Hornberger
Messages: 258
Registered: March 2004
Senior Member
Y.T. wrote:
> (I honestly fail to understand the provided example and am not at all
> sure that the two "rebins" are necessary. You are aware that 'rebin'
> performs interpolations, right?)

The rebin / reform steps are necessary if, e.g., you want to multiply a
3-d array [m, n, k] by a 2-d array [m, n] "layer by layer" in one array
operation rather than looping over k. Rebin won't interpolate in this
case, because you rebin from size 1 to size k (which just clones a value
k times). See the Dimension Juggling Tutorial at

http://www.dfanning.com/tips/rebin_magic.html

Some of the reform steps are necessary because of IDL's terrible
"feature" of cutting of trailing dimensions of size 1.

Thanks for the input! (I did run it multiple times, with similar
results, but I see that I should probably shut down as much other
activity on the computer as I can while timing these calculations.)

Benjamin
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Deleting structures (does this work, or am I missing something?)
Next Topic: Weird Runtime Problem

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

Current Time: Wed Dec 03 15:46:49 PST 2025

Total time taken to generate the page: 1.36551 seconds