IDL/GDL transpose() function behaves differently when single element array is passed in:
IDL> a=fltarr(1)
IDL> help,transpose(a)
FLOAT = Array[1]
GDL> a=fltarr(1)
GDL> help,transpose(a)
FLOAT = Array[1, 1]
(I.e. GDL keeps the 2nd 1-element dimension, IDL drops it)
Note that GDL behaves the same as IDL if the argument is 2d but with 1st dimension length=1
(both drop the last dimension):
IDL> a=fltarr(1,2)
IDL> help,transpose(a)
FLOAT = Array[2]
GDL> a=fltarr(1,2)
GDL> help,transpose(a)
FLOAT = Array[2]
IDL/GDL transpose() function behaves differently when single element array is passed in:
IDL> a=fltarr(1)
IDL> help,transpose(a)
FLOAT = Array[1]
GDL> a=fltarr(1)
GDL> help,transpose(a)
FLOAT = Array[1, 1]
(I.e. GDL keeps the 2nd 1-element dimension, IDL drops it)
Note that GDL behaves the same as IDL if the argument is 2d but with 1st dimension length=1
(both drop the last dimension):
IDL> a=fltarr(1,2)
IDL> help,transpose(a)
FLOAT = Array[2]
GDL> a=fltarr(1,2)
GDL> help,transpose(a)
FLOAT = Array[2]