[Tutor] cannonical matrix representation?

Mike Cheponis mac at Wireless.Com
Fri Feb 10 12:11:53 CET 2006


What's the best way to represent a matrix M with 4 dimensions, such as M[x][y][z][t] where each element in the sparse matrix could be a simple number, or could be an executable Python function snipped that returns a value when that cell is evaluated?

The user of the program will type in Python functions to be inserted into particular cells in the 4-D matrix.

I did't see any package that exactly does this; do I write my own Matrix class and base it on lists?

Thanks!  -Mike

p.s. This seems to me like it ought to be built into the base language - multidimensional object arrays. (Indeed, maybe it is, and I'm just too dense to notice!)



More information about the Tutor mailing list