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

Home » Public Forums » archive » IDL removes dimensions of size 1 automatically
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
IDL removes dimensions of size 1 automatically [message #41191] Fri, 24 September 2004 11:02
Benjamin Hornberger is currently offline  Benjamin Hornberger
Messages: 258
Registered: March 2004
Senior Member
Hi all,

I had a hard time finding a bug which came from IDL's behaviour to
remove dimensions of size 1 automatically sometimes.

IDL> a=[[1u,1u]]
IDL> help,a
A UINT = Array[2]
IDL> ;; IDL doesn't even let me specify this (2,1) element array
IDL> a=reform(a,2,1)
IDL> help,a
A UINT = Array[2, 1]
IDL> b=fix(a)
IDL> help,b
B INT = Array[2]
IDL> ;; IDL removed my second dimension even though I just wanted to
change the type
IDL> c=2*a
IDL> help,c
C INT = Array[2]
IDL> print,c
2 2
IDL> ;; again IDL kicked out my second dimension

I found this very annoying. Does anyone know more about it? Why is it
like that? In which situations will IDL do that?

Thanks for any comments,

Benjamin
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: SHMMAP
Next Topic: Re: Colored image

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

Current Time: Fri Oct 10 04:38:10 PDT 2025

Total time taken to generate the page: 1.19634 seconds