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

Home » Public Forums » archive » Undocumented behavior of TRANSPOSE
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
Undocumented behavior of TRANSPOSE [message #82787] Thu, 17 January 2013 03:13
tom.grydeland is currently offline  tom.grydeland
Messages: 51
Registered: September 2012
Member
Hello,

I was working on MY_TRANSPOSE -- a version of TRANSPOSE that introduces trailing singleton dimensions as necessary to fulfill the requested transpositions -- and trying to ensure that my replacement function would behave like TRANSPOSE in all cases that the latter would accept, when I ran into these unspecified corner cases:

IDL> pp = randomu(43, 2,3,4,5)
IDL> help, transpose(pp, [0, 1, 3])
<Expression> FLOAT = Array[2, 3, 5]
IDL> help, transpose(pp, [3,1])
<Expression> FLOAT = Array[5, 3]
help, array_equal(transpose(pp, [0, 3]), pp[*,0,0,*])
<Expression> BYTE = 1

so while TRANSPOSE (quite sensibly) refuses to consider repeated axes, it quite happily accepts missing axes, and just picks the first index along missing axes. Is this intentional? Is it useful? Should it be disallowed, or documented?

--T
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: X manager issue
Next Topic: What are the rules for automatic removal of singleton dimensions, and can I have a way of disabling them, please?

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

Current Time: Wed Oct 08 18:39:04 PDT 2025

Total time taken to generate the page: 0.00599 seconds