pymoose.index_axis
pymoose.index_axis#
- pymoose.index_axis(x, axis, index, placement=None)[source]#
Index a tensor along a given dimension.
- Parameters
x – A tensor.
axis – The dimension along which to index.
placement – An optional
Placementto pin this operation to.
- Returns
A slice of
xcorresponding to the sub-tensor atindexalongaxis.