@@ -256,15 +256,15 @@ def vectorize_graph(
256
256
import pytensor
257
257
import pytensor.tensor as pt
258
258
259
- from pytensor.graph import vectorize
259
+ from pytensor.graph import vectorize_graph
260
260
261
261
# Original graph
262
262
x = pt.vector("x")
263
263
y = pt.exp(x) / pt.sum(pt.exp(x))
264
264
265
265
# Vectorized graph
266
266
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})
268
268
269
269
fn = pytensor.function([new_x], new_y)
270
270
fn([[0, 1, 2], [2, 1, 0]])
@@ -277,7 +277,7 @@ def vectorize_graph(
277
277
import pytensor
278
278
import pytensor.tensor as pt
279
279
280
- from pytensor.graph import vectorize
280
+ from pytensor.graph import vectorize_graph
281
281
282
282
# Original graph
283
283
x = pt.vector("x")
@@ -286,7 +286,7 @@ def vectorize_graph(
286
286
287
287
# Vectorized graph
288
288
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})
290
290
291
291
fn = pytensor.function([new_x], [new_y1, new_y2])
292
292
fn([[-10, 0, 10], [-11, 0, 11]])
0 commit comments