Fix violin plot compatibility with NumPy 2.4+ by mosh3eb · Pull Request #5505 · plotly/plotly.py
The interpolation parameter was removed in NumPy 2.4.0 and replaced with 'method'. This was causing create_violin() to fail with newer NumPy versions.
Added version detection to use the correct parameter based on the installed NumPy version, maintaining backward compatibility with NumPy 1.x while supporting 2.4+.
Fixes #5461
Code PR
- I have read through the contributing notes and understand the structure of the package. In particular, if my PR modifies code of
plotly.graph_objects, my modifications concern the code generator and not the generated files. - I have added tests or modified existing tests.
- For a new feature, I have added documentation examples (please see the doc checklist as well).
- I have added a CHANGELOG entry if changing anything substantial.
- For a new feature or a change in behavior, I have updated the relevant docstrings in the code.