-
-
Notifications
You must be signed in to change notification settings - Fork 417
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
plot_hdi
raise exception when x
is string (#2412)
#2413
plot_hdi
raise exception when x
is string (#2412)
#2413
Conversation
plot_hdi
raise exception when x
is string (#2412)
f3b2f74
to
5a83e7b
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2413 +/- ##
===========================================
+ Coverage 68.26% 86.75% +18.48%
===========================================
Files 124 124
Lines 12936 12938 +2
===========================================
+ Hits 8831 11224 +2393
+ Misses 4105 1714 -2391 ☔ View full report in Codecov by Sentry. |
thansk @milesalanmoore! I will try to take a look at this later this week |
Thank you, @amaloney, for your time and very thoughtful message (#2412 (comment)). I have modified the error type and message per your suggestions! Let me know what you think. I took a bit of a liberty in the error message and add a recommendation to use az.plot_forest -- but I am happy to remove this or further modify the error message. |
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.
rad, thanks again for this
plot_hdi
raise exception when x
is string (#2412)plot_hdi
raise exception when x
is string (#2412)
Of course, I enjoyed contributing. Thank you for your time! Cheers! |
Description
It does not seem that categorical (str) type x values are supported by
az.plot_hdi
but the documentation for the function is not clear here and no exception is raised if x is type str (i.e. in the case of an ANOVA type model). Here, I've contributed the following:plot_hdi
test_plots_matplotlib.py
following the example of plot_hdi: add exception ifx
is typenp.datetime64
andsmooth=True
#2016.For now, I prefix the PR with [WIP] to invite input on whether or not to include this lack of support for str type x in the function documentation -- and because this is my first go at contributing to a repository of this caliber...
Fixes #2412
Checklist
History
raise
statement. Relocated & amended the commit with force-push to keep a concise history.📚 Documentation preview 📚: https://arviz--2413.org.readthedocs.build/en/2413/