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

Home » Public Forums » archive » replicating arrays
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
replicating arrays [message #53050] Fri, 16 March 2007 16:30 Go to next message
Christopher Thom is currently offline  Christopher Thom
Messages: 66
Registered: October 2006
Member
Hi,

My brain has stopped working on friday afternoon, so a quick question. I
have an array, and I want to make a multi-dimensional array, which is
simply copies of the old array, a la

newarray = replicate(array, 5)

where I would expect the result to be array[n_elements(array), 5].

Is this possible in a simple way? replicate only accepts scalars...

cheers
chris
Re: replicating arrays [message #53135 is a reply to message #53050] Sun, 18 March 2007 15:03 Go to previous message
Christopher Thom is currently offline  Christopher Thom
Messages: 66
Registered: October 2006
Member
Quoth Lasse Clausen:

> You might be interested to downloaded cmreplicate from here:
> http://cow.physics.wisc.edu/~craigm/idl/, which does the trick.

aha! And just when I thought I would hack together something myself.
Thanks all for the code tips, and a new bookmark in my idl tab.

cheers
chris
Re: replicating arrays [message #53138 is a reply to message #53050] Sat, 17 March 2007 10:36 Go to previous message
lasse is currently offline  lasse
Messages: 48
Registered: February 2007
Member
On 16 Mar, 23:30, Christopher Thom <c...@oddjob.uchicago.edu> wrote:
> Hi,
>
> My brain has stopped working on friday afternoon, so a quick question. I
> have an array, and I want to make a multi-dimensional array, which is
> simply copies of the old array, a la
>
> newarray = replicate(array, 5)
>
> where I would expect the result to be array[n_elements(array), 5].
>
> Is this possible in a simple way? replicate only accepts scalars...
>
> cheers
> chris

You might be interested to downloaded cmreplicate from here:
http://cow.physics.wisc.edu/~craigm/idl/, which does the trick.

Cheers
Lasse
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: Lots of files
Next Topic: Lots of files

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

Current Time: Wed Oct 08 19:33:11 PDT 2025

Total time taken to generate the page: 0.00718 seconds