Optional matplotlib dependency#311
Conversation
8e96aff to
3555f72
Compare
|
Thank you @axelstudios. This looks great. I will open an issue to report the changes in the changelog and go through the files one last time before merging. This seems like it is completely backwards compatible. We can plan for a Your previous changes had the plotting functionality moved outside of the different modules. It could be a good idea to implement a Would you mind appearing on the front page of the project in the 'all contributors' list? |
Not at all, that sounds great 🎉 |
|
@all-contributors |
|
I've put up a pull request to add @axelstudios! 🎉 |
This PR refactors all
matplotlibimports to be lazily imported with graceful error-handling to separate core functionality from visualization.Pygfunction can now be installed with optional matplotlib support:
pip install pygfunctionpip install pygfunction[plot]Attempting to call a function like
borefield.visualize_field()without theplotextra will result in the error:It also fixes a small handful of typos, and updates the minimum matplotlib version for compatibility with NumPy 2.0.