Skip to content

Commit 28cde7d

Browse files
committed
use tensor copy instead of identity
1 parent 3d04679 commit 28cde7d

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

pymc/pytensorf.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,8 @@
3737
from pytensor.graph.fg import FunctionGraph
3838
from pytensor.graph.op import Op
3939
from pytensor.scalar.basic import Cast
40-
from pytensor.scalar.basic import identity as scalar_identity
4140
from pytensor.scan.op import Scan
42-
from pytensor.tensor.basic import _as_tensor_variable
41+
from pytensor.tensor.basic import _as_tensor_variable, tensor_copy
4342
from pytensor.tensor.elemwise import Elemwise
4443
from pytensor.tensor.random.op import RandomVariable
4544
from pytensor.tensor.random.type import RandomType
@@ -378,7 +377,7 @@ def hessian_diag(f, vars=None):
378377
return empty_gradient
379378

380379

381-
identity = Elemwise(scalar_identity, name="identity")
380+
identity = tensor_copy
382381

383382

384383
def make_shared_replacements(point, vars, model):

0 commit comments

Comments
 (0)