diff --git a/pymc/pytensorf.py b/pymc/pytensorf.py index 2b9e4a8b03..f1d69c9282 100644 --- a/pymc/pytensorf.py +++ b/pymc/pytensorf.py @@ -559,6 +559,8 @@ def join_nonshared_inputs( class PointFunc: """Wraps so a function so it takes a dict of arguments instead of arguments.""" + __slots__ = ("f",) + def __init__(self, f): self.f = f @@ -567,8 +569,7 @@ def __call__(self, state): def __getattr__(self, item): """Allow access to the original function attributes.""" - if item == "f": - return self.f + # This is only reached if `__getattribute__` fails. return getattr(self.f, item)