Re: Behaviour of REFORM() changed in IDL 5.5? [message #29241] |
Fri, 08 February 2002 10:15  |
Robert Stockwell
Messages: 74 Registered: October 2001
|
Member |
|
|
Georg Wiora wrote:
> Hi everybody!
>
> I just found out that the behaviour of the REFORM() function
> seems to be changed in IDL 5.5. With IDL 5.4 I was able to
> reform a one dimensional array to a two dimensional with a
> trailing dimension of size one. With idl 5.5 these dimension
> is removed automaticaly. But from the documentation the
> automatic reduction of dimensions should only happen if no
> dimensions are specified. This change is not documented in
> the (windows) help file.
>
> Here is my example:
> array = INDGEN(100)
> image = REFORM(100,1)
>
> In IDl 5.4 the result was: image[100,1]
> In IDl 5.5 the result is: image[100]
>
> Is there anything known about a bug fix for that?
>
>
> Thanks,
>
> Georg
>
>
Hi Georg,
What os are you? A Windows one? Unfortunately my win2000
laptop is in the shop (BTW arg!) so I can't check behaviour there.
Here is my result, it seems ok at least under linux.
IDL> r = indgen(100)
IDL> help,r
R INT = Array[100]
IDL> help,reform(r,100,1)
<Expression> INT = Array[100, 1]
So as to do exactly as suggested above:
IDL> help,r
R INT = Array[100]
IDL> image = reform(r,100,1)
IDL> help,image
IMAGE INT = Array[100, 1]
And to try a leading dimension:
IDL> help,reform(r,1,100)
<Expression> INT = Array[1, 100]
Version info
IDL> help,!version,/st
** Structure !VERSION, 8 tags, length=76, data length=76:
ARCH STRING 'x86'
OS STRING 'linux'
OS_FAMILY STRING 'unix'
OS_NAME STRING 'linux'
RELEASE STRING '5.5'
BUILD_DATE STRING 'Aug 28 2001'
MEMORY_BITS INT 32
FILE_OFFSET_BITS
INT 32
Cheers,
bob
|
|
|
Re: Behaviour of REFORM() changed in IDL 5.5? [message #29247 is a reply to message #29241] |
Fri, 08 February 2002 08:57   |
R.Bauer
Messages: 1424 Registered: November 1998
|
Senior Member |
|
|
Georg Wiora wrote:
>
> Hi everybody!
>
> I just found out that the behaviour of the REFORM() function
> seems to be changed in IDL 5.5. With IDL 5.4 I was able to
> reform a one dimensional array to a two dimensional with a
> trailing dimension of size one. With idl 5.5 these dimension
> is removed automaticaly. But from the documentation the
> automatic reduction of dimensions should only happen if no
> dimensions are specified. This change is not documented in
> the (windows) help file.
>
> Here is my example:
> array = INDGEN(100)
> image = REFORM(100,1)
>
> In IDl 5.4 the result was: image[100,1]
> In IDl 5.5 the result is: image[100]
>
> Is there anything known about a bug fix for that?
>
> Thanks,
>
> Georg
Are you sure ?
IDL> array = INDGEN(100)
IDL> image = REFORM(array,100,1)
IDL> help,image
IMAGE INT = Array[100, 1]
IDL> help ,!version,/str
** Structure !VERSION, 8 tags, length=76, data length=76:
ARCH STRING 'x86'
OS STRING 'linux'
OS_FAMILY STRING 'unix'
OS_NAME STRING 'linux'
RELEASE STRING '5.5'
BUILD_DATE STRING 'Aug 28 2001'
MEMORY_BITS INT 32
FILE_OFFSET_BITS
INT 32
Reimar
--
Reimar Bauer
Institut fuer Stratosphaerische Chemie (ICG-1)
Forschungszentrum Juelich
email: R.Bauer@fz-juelich.de
http://www.fz-juelich.de/icg/icg1/
============================================================ ======
a IDL library at ForschungsZentrum Juelich
http://www.fz-juelich.de/icg/icg1/idl_icglib/idl_lib_intro.h tml
http://www.fz-juelich.de/zb/text/publikation/juel3786.html
============================================================ ======
|
|
|
|
Re: Behaviour of REFORM() changed in IDL 5.5? [message #29252 is a reply to message #29248] |
Fri, 08 February 2002 08:04   |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Georg Wiora (georg.wiora@DaimlerChrysler.com) writes:
> Here is my example:
> array = INDGEN(100)
> image = REFORM(100,1)
>
> In IDl 5.4 the result was: image[100,1]
> In IDl 5.5 the result is: image[100]
>
> Is there anything known about a bug fix for that?
Uh, I think, Georg, that if you put the array inside
of the REFORM you should be set. :-)
IDL> print, !version
{ x86 Win32 Windows Microsoft Windows 5.5 Aug 28 2001 32 64}
IDL>
IDL> array = INDGEN(100)
IDL> a=reform(array, 100, 1)
IDL> help, a
A INT = Array[100, 1]
Cheers,
David
--
David W. Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|
Re: Behaviour of REFORM() changed in IDL 5.5? [message #29315 is a reply to message #29241] |
Mon, 11 February 2002 01:01  |
Georg Wiora
Messages: 13 Registered: November 2001
|
Junior Member |
|
|
Am Fri, 08 Feb 2002 11:15:02 -0700, hat Robert Stockwell
<rgs1967@hotmail.com> geschrieben:
>
> Georg Wiora wrote:
>
>> Here is my example:
>> array = INDGEN(100)
>> image = REFORM(100,1)
Sorry for the Typo :-\
It's obviously
image = REFORM(array,100,1)
> Hi Georg,
>
> What os are you? A Windows one? Unfortunately my win2000
I have a WIN 2000 system.
When I try it on the command line, it works fine, but not in
my application. Probably it is just some instability problem.
Regards,
Georg
|
|
|