MathGroup Archive 1995

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

Search the Archive

Re: Problems with high-dimensional lists

  • To: mathgroup at smc.vnet.net
  • Subject: [mg2532] Re: [mg2494] Problems with high-dimensional lists
  • From: Allan Hayes <hay at haystack.demon.co.uk>
  • Date: Thu, 16 Nov 1995 01:46:49 -0500


Begin forwarded message:

Sascha  
Unzicker<Sascha at sunmail.lrz-muenchen.de,Unzicker at lrz.uni-muenchen.de>
Problems with high-dimensional lists

Reports the following

   a=Table[0,{3},{4},{5},{6}];
   Dimensions[a]
      {3, 4, 5, 6},

   a[[1,1]]=Table[x,{6},{5}];  (*1*)
   Dimensions[a]
      {3, 4}

   Transpose[a,{4,1,2,3}];
      Transpose::tperm:
         Permutation {4, 1, 2, 3} is longer than the dimensions {3,   
	 4} of the array.

Sascha:

After (*1*), a is no longer a cuboidal array. Dimensions only goes  
as deep as the cuboidal structure. This is also shown by  
TensorRank[original a] being 4 and TensorRank[a after (*1*)] being  
2.

A simpler example of the effect is

   a=Table[0,{2},{1}]
      {{0}, {0}}
   TensorRank[a]
      2
   Dimensions[a]
      {2, 1}
   a[[1]] = {1,2}
      {1, 2}
   a
      {{1, 2}, {0}}
   TensorRank[a]
      1
   Dimensions[a]
      {2}
   Transpose[a]
      Transpose::nmtx:
         The first two levels of the one dimensional list {{1, 2},    
	 {0}}cannot be transposed.

      Transpose[{{1, 2}, {0}}]

Allan Hayes
hay at haystack.demon.co.uk








  • Prev by Date: Re: Positive[a] = True ???
  • Next by Date: RE: Re: Writing big files with Mathematica
  • Previous by thread: Re: Problems with high-dimensional lists
  • Next by thread: Re: Problems with high-dimensional lists