We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
import pytensor.tensor as pt import numpy as np x = np.zeros(3) x[[0, 0, 0]] += 1 print(x) # [1, 0, 0] x = pt.zeros(3) x = x[[0, 0, 0]].inc(1) print(x.eval()) # [3, 0, 0] x = pt.zeros(3) x = x[[0, 0, 0]].inc(1, ignore_duplicates=True) print(x.eval()) # [1, 0, 0]