-
Notifications
You must be signed in to change notification settings - Fork 2
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 meshgrid binning #101
fix meshgrid binning #101
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.
Thanks, @hoetzsch . After the requested changes are met, I think it is good to merge.
@@ -52,8 +53,14 @@ def __init__(self, name: str = None, **config): | |||
warning = f'The usage of meshgrid binning is highly discouraged.' | |||
warn(warning) | |||
self.component_bins_type = 'meshgrid' | |||
x_bins = jnp.linspace(*config['x_clip'], self._bins[0] + 1) | |||
y_bins = jnp.linspace(*config['y_clip'], self._bins[1] + 1) | |||
if isinstance(self._bins[0], int): |
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.
[pep8] reported by reviewdog 🐶
WPS204 Found overused expression: self._bins[0]; used 8 > 4
@dachengx thanks, changed it! |
Pull Request Test Coverage Report for Build 5303825558
💛 - Coveralls |
) | ||
llh = apt.Likelihood(**instruct) | ||
error_raised = False | ||
except Exception: |
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.
[pep8] reported by reviewdog 🐶
S110 Try, Except, Pass detected.
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.
I added some tests and warnings. Looks good now.
Meshgrid binning fix (by Zihao). To be nicified