Skip to content

Conversation

@CalebG6
Copy link
Contributor

@CalebG6 CalebG6 commented Oct 1, 2025

Description

In the dotplot.py file I added a check to see if the values array has any NaNs and removed them locally if it does. Reasoning for this is because the backend matplot dot_plot function would get a NaN binwidth causing a deadloop.
Screenshot 2025-10-01 140325

from numpy import nan

arviz.plot_dot([0.81449801, 0.8748649 ,        nan,        nan,        nan], show=False)

The above plot uses this code
closes #2471

Checklist

  • Follows official PR format
  • Includes a sample plot to visually illustrate the changes (only for plot-related functions)
  • Code style correct (follows pylint and black guidelines)
  • Changes are listed in changelog

📚 Documentation preview 📚: https://arviz--2483.org.readthedocs.build/en/2483/

Copy link
Member

@OriolAbril OriolAbril left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! I will make sure it gets included in the next release.

I suspect there were some lint related issues (that triggered the CI failures on azure pipelines)

It would also be great if you can add the example with nans you give in the PR description as a test.

Either way let me know what you can and want to work on. Otherwise I will commit directly to the PR to get it into mergeable state

@codecov
Copy link

codecov bot commented Oct 21, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.82%. Comparing base (f8b4bfc) to head (1f4070d).
⚠️ Report is 10 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2483      +/-   ##
==========================================
- Coverage   86.82%   86.82%   -0.01%     
==========================================
  Files         124      124              
  Lines       13014    13021       +7     
==========================================
+ Hits        11300    11305       +5     
- Misses       1714     1716       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@OriolAbril OriolAbril merged commit b165a20 into arviz-devs:main Oct 22, 2025
10 of 12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dead loop in plot_dot

2 participants