Have you looked into numpy module? It is not specific to Sage, but it
should work. Also, the indexing is a little bit friendlier.
sage: import numpy
sage: C = numpy.array(1, 2], [3, 4]], [[3, 4], [5, 6]]], [[[7, 8], [9,
10]], [[-1, -2], [-3, -4)
sage: C
array( 1, 2],
[ 3, 4]
On 05/20/2013 01:52 PM, Santanu Sarkar wrote:
Is the any way to write four dimensional array in Sage like C
int M[10][10][10][10]? For two dimensional case I use Matrix.
How do you intend to use it? You can simply create a nested list.
sage: C = 1,2], [3]], [[3], [4]]], [[[1,2],[3]],[[3],