Skip to content

Commit

Permalink
Update vectorize_graph docstring
Browse files Browse the repository at this point in the history
Docstring still uses old name of `vectorize`
  • Loading branch information
zaxtax authored and ricardoV94 committed Dec 15, 2023
1 parent 8ae14c2 commit 60a9566
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pytensor/graph/replace.py
Expand Up @@ -256,15 +256,15 @@ def vectorize_graph(
import pytensor
import pytensor.tensor as pt
from pytensor.graph import vectorize
from pytensor.graph import vectorize_graph
# Original graph
x = pt.vector("x")
y = pt.exp(x) / pt.sum(pt.exp(x))
# Vectorized graph
new_x = pt.matrix("new_x")
new_y = vectorize(y, replace={x: new_x})
new_y = vectorize_graph(y, replace={x: new_x})
fn = pytensor.function([new_x], new_y)
fn([[0, 1, 2], [2, 1, 0]])
Expand All @@ -277,7 +277,7 @@ def vectorize_graph(
import pytensor
import pytensor.tensor as pt
from pytensor.graph import vectorize
from pytensor.graph import vectorize_graph
# Original graph
x = pt.vector("x")
Expand All @@ -286,7 +286,7 @@ def vectorize_graph(
# Vectorized graph
new_x = pt.matrix("new_x")
[new_y1, new_y2] = vectorize([y1, y2], replace={x: new_x})
[new_y1, new_y2] = vectorize_graph([y1, y2], replace={x: new_x})
fn = pytensor.function([new_x], [new_y1, new_y2])
fn([[-10, 0, 10], [-11, 0, 11]])
Expand Down

0 comments on commit 60a9566

Please sign in to comment.