-
-
Notifications
You must be signed in to change notification settings - Fork 426
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
add skipna argument to plot_posterior #1432
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1432 +/- ##
==========================================
- Coverage 91.97% 91.96% -0.01%
==========================================
Files 105 105
Lines 11173 11179 +6
==========================================
+ Hits 10276 10281 +5
- Misses 897 898 +1
Continue to review full report at Codecov.
|
arviz/plots/plot_utils.py
Outdated
|
||
Returns | ||
------- | ||
point_value : float | ||
best estimate of data distribution | ||
""" | ||
print("ski", skipna) |
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.
Why the print?
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.
My bad!
@@ -579,7 +585,10 @@ def calculate_point_estimate(point_estimate, values, bw="default", circular=Fals | |||
else: | |||
point_value = mode(values)[0][0] | |||
elif point_estimate == "median": | |||
point_value = np.median(values) | |||
if skipna: |
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.
We should add tests for this specific function as well at the plotting level
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 have added a test for skipna
(True or False) for both matplotlib and bokeh. What else is needed?
@canyon289 I think this is ready to merge. |
Plot posterior fails if
nan
are present, this adds a skipna argument, defaults to False.