Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions pymc/pytensorf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",)
Copy link
Member Author

@ricardoV94 ricardoV94 Jun 19, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Speedups self.f


def __init__(self, f):
self.f = f

Expand All @@ -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)


Expand Down