How to access the element in Symbol with index?

#1

Hi,

Does someone know how to access the element in Symbol with index?
For example, a is a symbol has a shape (2,1), and I want to access the element in the upper left corner.
Currently, I’m using the slice function, but it looks not that nice.

mx.symbol.slice(a, begin=(0, 0), end=(1, 1)))

#2

hi,

if you want the return type to be a symbol as well then slice is the way to go. otherwise. you can get the data in the symbol as an ndarray and use regular ndarray indexing