Skip to content

Fix colab numpy version#53

Merged
justinlaughlin merged 2 commits intomainfrom
fix-colab-numpy-version
May 8, 2025
Merged

Fix colab numpy version#53
justinlaughlin merged 2 commits intomainfrom
fix-colab-numpy-version

Conversation

@justinlaughlin
Copy link
Contributor

Colab notebooks have some default libraries that are automatically updated. It looks like they recently upgraded numpy to >=2.0.0, which PyMFEM (and other libraries) aren't supporting yet. PyMFEM specifies it requires numpy < 2.0.0 but it looks like the notebook isn't respecting that. This PR downgrades numpy on the Colab notebooks

@justinlaughlin justinlaughlin requested a review from Copilot May 8, 2025 23:02
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR addresses a compatibility issue in Colab notebooks by downgrading the numpy version to ensure that PyMFEM’s dependency requirement (numpy < 2.0.0) is met.

  • Updated pip install commands in three example notebooks to install numpy==1.26.4 alongside glvis.
  • Corrected a typo and clarified the description in the README.md regarding the dependency chain.

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.

File Description
examples/plot.ipynb Changed pip command to pin numpy to version 1.26.4 for PyMFEM compatibility.
examples/ex9.ipynb Changed pip command to pin numpy to version 1.26.4 for PyMFEM compatibility.
examples/ex1.ipynb Changed pip command to pin numpy to version 1.26.4 for PyMFEM compatibility.
README.md Updated diagram label and fixed a spelling error in the dependency explanation.

@justinlaughlin justinlaughlin merged commit d692f8a into main May 8, 2025
@justinlaughlin justinlaughlin deleted the fix-colab-numpy-version branch May 8, 2025 23:06
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.

2 participants