Skip to content

Commit

Permalink
Move Identity operator initialization close to class definition
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardoV94 committed May 17, 2022
1 parent c327a02 commit 4969460
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pymc/aesaraf.py
Original file line number Diff line number Diff line change
Expand Up @@ -584,6 +584,10 @@ def __hash__(self):
return hash(type(self))


scalar_identity = IdentityOp(scalar.upgrade_to_float, name="scalar_identity")
identity = Elemwise(scalar_identity, name="identity")


def make_shared_replacements(point, vars, model):
"""
Makes shared replacements for all *other* variables than the ones passed.
Expand Down Expand Up @@ -688,10 +692,6 @@ def __call__(self, input):
return aesara.clone_replace(self.tensor, {oldinput: input}, strict=False)


scalar_identity = IdentityOp(scalar.upgrade_to_float, name="scalar_identity")
identity = Elemwise(scalar_identity, name="identity")


class GeneratorOp(Op):
"""
Generator Op is designed for storing python generators inside aesara graph.
Expand Down

0 comments on commit 4969460

Please sign in to comment.