Skip to content

Commit 4969460

Browse files
committed
Move Identity operator initialization close to class definition
1 parent c327a02 commit 4969460

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pymc/aesaraf.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -584,6 +584,10 @@ def __hash__(self):
584584
return hash(type(self))
585585

586586

587+
scalar_identity = IdentityOp(scalar.upgrade_to_float, name="scalar_identity")
588+
identity = Elemwise(scalar_identity, name="identity")
589+
590+
587591
def make_shared_replacements(point, vars, model):
588592
"""
589593
Makes shared replacements for all *other* variables than the ones passed.
@@ -688,10 +692,6 @@ def __call__(self, input):
688692
return aesara.clone_replace(self.tensor, {oldinput: input}, strict=False)
689693

690694

691-
scalar_identity = IdentityOp(scalar.upgrade_to_float, name="scalar_identity")
692-
identity = Elemwise(scalar_identity, name="identity")
693-
694-
695695
class GeneratorOp(Op):
696696
"""
697697
Generator Op is designed for storing python generators inside aesara graph.

0 commit comments

Comments
 (0)