Skip to content

Commit 5119566

Browse files
committed
add feedback to docstrings
1 parent 81d4f67 commit 5119566

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

pytensor/tensor/subtensor.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1462,6 +1462,8 @@ def set_subtensor(x, y, inplace=False, tolerate_inplace_aliasing=False):
14621462
r = vector("r")
14631463
new_r = set_subtensor(r[10:], 5)
14641464
1465+
Consider using :func:`pytensor.tensor.variable.TensorVariable.set` instead.
1466+
14651467
"""
14661468
return inc_subtensor(
14671469
x,
@@ -1520,7 +1522,9 @@ def inc_subtensor(
15201522
.. code-block:: python
15211523
15221524
r = ivector("r")
1523-
new_r = inc_subtensor(r[10:], 5, ignore_duplicates=True)
1525+
new_r = inc_subtensor(r[[0, 1, 0]], 5, ignore_duplicates=True)
1526+
1527+
Consider using :func:`pytensor.tensor.variable.TensorVariable.inc` instead.
15241528
15251529
"""
15261530
# First of all, y cannot have a higher dimension than x,

0 commit comments

Comments
 (0)