public operator[](i as Long) as Object
Gets one scalar for a 1D array, or an independent first-axis slice for higher ranks. The result is Object because array rank is a runtime value. Use an explicit slice such as matrix[0, :] for a statically typed tensor.
| Parameter | Description |
|---|---|
i | First-axis coordinate; negative indices count backwards. |
T for a vector; NDArray<T> for a higher-rank array.
a = NDArray<Int>([10, 20, 30]) print(a[1]) # 20