Skip to content

Commit 60a9566

Browse files
zaxtaxricardoV94
authored andcommitted
Update vectorize_graph docstring
Docstring still uses old name of `vectorize`
1 parent 8ae14c2 commit 60a9566

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pytensor/graph/replace.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -256,15 +256,15 @@ def vectorize_graph(
256256
import pytensor
257257
import pytensor.tensor as pt
258258
259-
from pytensor.graph import vectorize
259+
from pytensor.graph import vectorize_graph
260260
261261
# Original graph
262262
x = pt.vector("x")
263263
y = pt.exp(x) / pt.sum(pt.exp(x))
264264
265265
# Vectorized graph
266266
new_x = pt.matrix("new_x")
267-
new_y = vectorize(y, replace={x: new_x})
267+
new_y = vectorize_graph(y, replace={x: new_x})
268268
269269
fn = pytensor.function([new_x], new_y)
270270
fn([[0, 1, 2], [2, 1, 0]])
@@ -277,7 +277,7 @@ def vectorize_graph(
277277
import pytensor
278278
import pytensor.tensor as pt
279279
280-
from pytensor.graph import vectorize
280+
from pytensor.graph import vectorize_graph
281281
282282
# Original graph
283283
x = pt.vector("x")
@@ -286,7 +286,7 @@ def vectorize_graph(
286286
287287
# Vectorized graph
288288
new_x = pt.matrix("new_x")
289-
[new_y1, new_y2] = vectorize([y1, y2], replace={x: new_x})
289+
[new_y1, new_y2] = vectorize_graph([y1, y2], replace={x: new_x})
290290
291291
fn = pytensor.function([new_x], [new_y1, new_y2])
292292
fn([[-10, 0, 10], [-11, 0, 11]])

0 commit comments

Comments
 (0)