       Problems with high-dimensional lists

• To: mathgroup at smc.vnet.net
• Subject: [mg2494] Problems with high-dimensional lists
• From: Sascha at sunmail.lrz-muenchen.de, Unzicker at lrz.uni-muenchen.de
• Date: Wed, 15 Nov 1995 01:57:59 -0500
• Organization: Universitaet Muenchen (Germany)

```Let me give an example:

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

Dimensions[a]

gives you
Out= {3, 4, 5, 6},
of course.

But if you try to assign a new value to a sublist
a[[1,1]]=Table[x,{6},{5}];
Mathematica forgets that a still should have the Dimension {3,4,5,6}:

In:= Dimensions[a]
Out= {3, 4}
In:= Transpose[a,{4,1,2,3}];

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

is now impossible, although

In:= a[[3,4,5,6]]
Out= 0
returns still the correct value. Why does Mathematica make this difference?
If you print a, there is no difference.

a=Array[a,{3,4,5,6}];

is not possible because a[[1,1,1,1]] gives a mess.

Sascha Unzicker

```

• Prev by Date: Final comments on CoefficientList
• Next by Date: (fix) bizarre mathematica replacement rule error
• Previous by thread: Problems with high-dimensional lists
• Next by thread: Re: Problems with high-dimensional lists