Skip to content
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 plot_lm and _z_scale for scipy 1.10 #2186

Merged
merged 5 commits into from
Dec 22, 2022
Merged

Conversation

OriolAbril
Copy link
Member

@OriolAbril OriolAbril commented Dec 21, 2022

Description

plot_lm used np.tile on the plotter lists which contain 4 elements, a string, two dicts and an
array, somehow coercing all this into a numpy array while doing some repetition of elements
to match x and y values. This always rose many warnings, it now breaks the code and therefore the
tests.

This PR updates this to use lists and itertools all the way to perform the same type of repetitions,
no array features were really used so I think it makes more sense to use lists.

I have also updated the code in _z_scale to work with scipy 1.10 and higher as the nan policy in rankdata has changed.

Checklist

  • Does the PR follow official PR format?
  • Does the PR include new or updated tests to prevent issue recurrence (using pytest fixture pattern)?
    It does not, tests are already broken due to this so it can't go back.
  • Is the code style correct (follows pylint and black guidelines)?
  • Is the fix listed in the Maintenance and fixes
    section of the changelog?

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

@OriolAbril OriolAbril changed the title Fix plot_lm Fix plot_lm and _z_scale for scipy 1.10 Dec 22, 2022
@codecov
Copy link

codecov bot commented Dec 22, 2022

Codecov Report

Merging #2186 (681bad3) into main (3c82bdd) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #2186   +/-   ##
=======================================
  Coverage   89.96%   89.96%           
=======================================
  Files         119      119           
  Lines       12401    12408    +7     
=======================================
+ Hits        11156    11163    +7     
  Misses       1245     1245           
Impacted Files Coverage Δ
arviz/plots/lmplot.py 96.84% <100.00%> (+0.10%) ⬆️
arviz/stats/diagnostics.py 98.97% <100.00%> (+0.01%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@OriolAbril OriolAbril merged commit fadbc20 into arviz-devs:main Dec 22, 2022
@OriolAbril OriolAbril deleted the fix_ci branch December 22, 2022 02:23
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.

1 participant