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

Home » Public Forums » archive » Re: how to preserve trailing Shallow dimensions!
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: how to preserve trailing Shallow dimensions! [message #61994 is a reply to message #61933] Sun, 17 August 2008 15:43 Go to previous message
Mark[1] is currently offline  Mark[1]
Messages: 66
Registered: February 2008
Member
Functions like make_array and indgen silently strip off trailing
shallow dimensions, but it is possible to override this using reform,
eg:

IDL> help, make_array(2,1,1)
<Expression> FLOAT = Array[2]
IDL> help, reform(make_array(2,1,1),2,1,1)
<Expression> FLOAT = Array[2, 1, 1]

The size function does accurately report the number of dimensions, I
think

IDL> print, size(make_array(2,1,1), /DIMENSIONS)
2
IDL> print, size(reform(make_array(2,1,1),2,1,1), /DIMENSIONS)
2 1 1

However, IDL is generally prone to chopping them off when you least
expect it, so is best to write code that will handle this.
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: LaTex?
Next Topic: A question about map projection

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

Current Time: Sat Oct 11 09:42:04 PDT 2025

Total time taken to generate the page: 2.47776 seconds