Loading [MathJax]/jax/output/HTML-CSS/jax.js
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

asked 5 years ago

Boston gravatar image

Hypermatrices?

Hi all,

I want to store and manipulate arrays of n×n×n numbers xijkwhere0i,j,kn1 with Sage.

Here is what I have been doing so far:

import numpy as np

n = 7

X = np.zeros((n, n, n))

X[2][4][1] = 17

etc...

Remark: So X is a so called 3-hypermatrix.

Question: Are NumPy arrays my best option when handling hypermatrices with Sage?

Precision: I will need to manipulate lists of such hypermatrices, and even hypermatrices whose elements will be hypermatrices, e.g. X(abcd)ijk and loop over such lists, e.g. for a ..., for b ..., for c ..., do ... with the 3-hypermatrix X(abcd).