MathGroup Archive 2004

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

Search the Archive

options Transpose[] ?


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:
{2,4,3}.

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

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,
	     Petr


  • 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[] ?