Ask Your Question

Revision history [back]

It depends on your use, but if you want to build complex constructions out of them on the long term, i would suggest to define your own Hypermatrix/Hypermatrices element and parent classes, so that changing base ring, product, etc will be less painful, see the folliwing links:

  • https://doc.sagemath.org/html/en/tutorial/tour_coercion.html
  • https://doc.sagemath.org/html/en/thematic_tutorials/index.html#parents-elements-categories-and-algebraic-structures
  • https://doc.sagemath.org/html/en/reference/structure/index.html

Now i am not sure about having numpy arrays as a backend. Those are fast, but since the dtype will be any object, i am not sure about the benefit.