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

Home » Public Forums » archive » Re: Automatic truncation of trailing dimension.....
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: Automatic truncation of trailing dimension..... [message #28263 is a reply to message #28262] Tue, 27 November 2001 13:32 Go to previous messageGo to previous message
Liam E. Gumley is currently offline  Liam E. Gumley
Messages: 378
Registered: January 2000
Senior 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.

I take it you mean

<Expression> FLOAT = Array[100, 1, 1]

Does your code absolutely require it? In many cases, you can use the two
interchangeably.

If you must maintain the dimensions:

IDL> dims = size(x, /dimensions)
IDL> index = 1
IDL> help, reform(x[*, *, index], dims[0], dims[1], 1)
<Expression> FLOAT = Array[100, 1, 1]

Cheers,
Liam.
Practical IDL Programming
http://www.gumley.com/
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: New All-Time Records on IDL Newsgroup
Next Topic: Segmentation of Image

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

Current Time: Sat Oct 11 09:14:14 PDT 2025

Total time taken to generate the page: 0.96302 seconds