Does sagemath support something similar to numpy's einsum for symbolic arrays?

Skip to first unread message

Anton Todorov

Apr 9, 2024, 9:59:27 AMApr 9
to sage-support

It is a way to define multiple operations on arrays of arbitrary shape. I've not seen anything that suggests this is implemented in sagemath, but I was hoping there might be something hidden.

What I need this for is to calculate symbolic results of array operations which are too cumbersome to represent as matrix operations.

Matthias Koeppe

Apr 15, 2024, 10:19:29 PMApr 15
to sage-support

Anton Todorov

Apr 20, 2024, 10:13:14 AMApr 20
Looks close but not quite.

I'm interested in what's described here:

Basically a dumb as bricks extension to matrices to higher dimensions with a contraction along selectable axes, with no notion of co and contravariance, and ability to have any number of elements in each dimension, e.g. a (8,1,512) shaped tensor (or n-way-array) should be possible.

From what I've seen of tensors with indices are forced to be n-dimensional cubes (along with having the co and contravariant limitations to contractions). 

You received this message because you are subscribed to a topic in the Google Groups "sage-support" group.
To unsubscribe from this topic, visit
To unsubscribe from this group and all its topics, send an email to
To view this discussion on the web visit
Reply all
Reply to author
0 new messages