aesara.tensor.set_subtensor

Contents

aesara.tensor.set_subtensor#

aesara.tensor.set_subtensor(x, y, inplace=False, tolerate_inplace_aliasing=False)[source]#

Return x with the given subtensor overwritten by y.

Parameters:
  • x – Symbolic variable for the lvalue of = operation.

  • y – Symbolic variable for the rvalue of = operation.

  • tolerate_inplace_aliasing – See inc_subtensor for documentation.

Examples

To replicate the numpy expression “r[10:] = 5”, type

>>> r = ivector()
>>> new_r = set_subtensor(r[10:], 5)