Re: Automatic truncation of trailing dimension..... [message #28262 is a reply to message #28261] |
Tue, 27 November 2001 13:45   |
tam
Messages: 48 Registered: February 2000
|
Member |
|
|
Paul van Delst wrote:
>
> .....of an array when the dimension size is 1 is a real pain in the ass. Given:
>
> IDL> x=fltarr(100,1,15)
> IDL> help, x
> X FLOAT = Array[100, 1, 15]
>
> Is there anyway to prevent:
>
> IDL> help, x[*,*,1]
> <Expression> FLOAT = Array[100]
> IDL>
>
> i.e. to give:
> <Expression> FLOAT = Array[100,1]
>
> Argh wot a pain.
>
> --
Under our previous president I guess I would have said
"I feel your pain"
but now it's
"This is evil."
You might find:
< http://groups.google.com/groups?q=dimension+trailing&hl= en&group=comp.lang.idl-pvwave&rnum=8&selm=onlngh jin1.fsf%40cow.physics.wisc.edu>
to be helpful.
I suppose you could do something like:
sz = size(x)
nvar = reform(x[*,*,1],sz[1],sz[2],1)
help,nvar
Everyone seems to be bitten by this at one time or another...
Regards,
Tom McGlynn
|
|
|