pymoose.sliced#

pymoose.sliced(x, begin, end, placement=None)[source]#

Compute a slice of a value.

Parameters
  • x – A slice-able value, e.g. a TensorType or ShapeType.

  • begin – Index to start the slice at, e.g. 1 in x[1:5].

  • end – Non-inclusive index to end the slice at, e.g. 5 in x[1:5].

  • placement – An optional Placement to pin this operation to.

Returns

The sliced value.