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

Bump Python packages version requirements #4115

Merged
merged 4 commits into from
Feb 19, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
docs: Add guard against unsupported pint versions
Old pint versions are known to be incompatible with numpy.
See the pint release notes for the complete list of numpy
issues: https://github.com/hgrecco/pint/blob/master/CHANGES

For example in pint 0.8.1, np.cbrt() silently converts a
pint.Quantity object to a float object, while np.sqrt()
doesn't. Also, several quantities like ureg.molar and
ureg.avogadro_constant were only introduced in pint 0.9.
  • Loading branch information
jngrad committed Feb 12, 2021
commit 390beaff9709b0c6f96d51a73138b147ac462672
3 changes: 3 additions & 0 deletions doc/tutorials/constant_pH/constant_pH.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,10 @@
"source": [
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
"import setuptools\n",
"import pint # module for working with units and dimensions\n",
"assert setuptools.version.pkg_resources.packaging.specifiers.SpecifierSet('>=0.10.1').contains(pint.__version__), \\\n",
" f'pint version {pint.__version__} is too old: several numpy operations can cast away the unit'\n",
"\n",
"import espressomd\n",
"espressomd.assert_features(['WCA', 'ELECTROSTATICS'])\n",
Expand Down