Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

3
  • $\begingroup$ Unfortunately it doesn't, since I explicitly would want an expression that works with a symbolic index: in your examples, you always give m an explicit integer value, whereas I would want the indexing to work for symbolic inputs, i.e. aV[m] should return a[m] or a_m, where both a and m are symbolic. $\endgroup$ Commented Aug 5, 2023 at 15:28
  • 1
    $\begingroup$ As much as I understand you, you are looking for a possibility to make symbolic operations with indexed tensors, right? I am also looking for such an approach, but up to now, did not see a satisfactory one. $\endgroup$ Commented Aug 5, 2023 at 21:28
  • $\begingroup$ Yes! I ended up defining a wrapper function that wraps 2D arrays and produces the desired behavior, but it would be nice to have a general abstract array class that generalizes to higher dimensions, and even symbolic sizes. Honestly somewhat surprised this does not exist yet! $\endgroup$ Commented Aug 7, 2023 at 15:15