Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2004

[Date Index] [Thread Index] [Author Index]

Search the Archive

options Transpose[] ?

  • To: mathgroup at
  • Subject: [mg48977] options Transpose[] ?
  • From: Petr Kujan <kujanp at>
  • Date: Fri, 25 Jun 2004 17:52:19 -0400 (EDT)
  • Organization: Czech Technical University
  • Sender: owner-wri-mathgroup at

Hello Mathematica User Group.

If I have an multidimensional array A:

In[1] :=
   A = Array[Random[]&, dims = {3,2,4}]

Than I expect that dimension of transposed A with options per = {3,1,2} 
is equal  {4,3,2} === dims[[per]] , but it is not equal!

Dimensions of transposed A with options per = {3,1,2} is:

In[2] :=
   Dimensions[Transpose[A, per = {3, 1, 2}]]

It' s correct or it's bug?
How can I get the same dimensions?

This is a code for other possible options per in Transpose[A,per] and 
tests if it's equal dims[[per]]:

In[3] :=
d = Length[dims];
Dimensions[Transpose[A, #]] == dims[[#]]& /@ Permutations[Range[d]]

I require all elements in True!

Thanks a lot,

  • Prev by Date: Re: Use the standard form of time 00:00:00 as the tick markes on x-axis
  • Next by Date: Re: Simple expression won't simplify
  • Previous by thread: Re: Equation - problem
  • Next by thread: Re: options Transpose[] ?