The current indexing system although works, is not compliant to PyTorch and NumPy. For example in numpy np.zeros(4, 4)[:, 1].shape results in (4, ). But in Etaler, zeros({4, 4}),view({all(), 1}).shape() will return Shape{4, 1}. This is due to show resulting shape is calculate and we pass the Range type for indexing and there's no way to separate when we are indexing via a range or a single value.
The current indexing system although works, is not compliant to PyTorch and NumPy. For example in numpy
np.zeros(4, 4)[:, 1].shape
results in(4, )
. But in Etaler,zeros({4, 4}),view({all(), 1}).shape()
will returnShape{4, 1}
. This is due to show resulting shape is calculate and we pass theRange
type for indexing and there's no way to separate when we are indexing via a range or a single value.