-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: suppress buggy output from pytensor.function #595
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this functionality meant to sit in test_likelihoods.py
or is this wip?
HSSM/src/hssm/distribution_utils/dist.py Line 413 in fa12018
It could be used there as well right now. @AlexanderFengler Where would a good home be for the output suppressor? |
5793a2e
to
7e4a5a2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! Just one comment: we use numpy docstring format. The docstring is slightly non-standard :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
@@ -548,3 +550,43 @@ def _rearrange_data(data: pd.DataFrame | np.ndarray) -> pd.DataFrame | np.ndarra | |||
def _split_array(data: np.ndarray | list[int], divisor: int) -> list[np.ndarray]: | |||
num_splits = len(data) // divisor + (1 if len(data) % divisor != 0 else 0) | |||
return [tmp.astype(int) for tmp in np.array_split(data, num_splits)] | |||
|
|||
|
|||
class SuppressOutput: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry about the late response here, but his converged to the right spot :)
See #594.