class NumpyVersion:
Parse and compare numpy version strings.
NumPy has the following versioning scheme (numbers given are examples; they can be > 9 in principle):
Comparing needs to be done against a valid version string or other
NumpyVersion
instance. Note that all development versions of the same
(pre-)release compare equal.
>>> from numpy.lib import NumpyVersion >>> if NumpyVersion(np.__version__) < '1.7.0': ... print('skip') >>> # skip
>>> NumpyVersion('1.7') # raises ValueError, add ".0" Traceback (most recent call last): ... ValueError: Not a valid numpy version string
Method | __eq__ |
Undocumented |
Method | __ge__ |
Undocumented |
Method | __gt__ |
Undocumented |
Method | __init__ |
Undocumented |
Method | __le__ |
Undocumented |
Method | __lt__ |
Undocumented |
Method | __ne__ |
Undocumented |
Method | __repr__ |
Undocumented |
Method | _compare |
Undocumented |
Method | _compare_pre_release |
Compare alpha/beta/rc/final. |
Method | _compare_version |
Compare major.minor.bugfix |
Instance Variable | bugfix |
Undocumented |
Instance Variable | is_devversion |
Undocumented |
Instance Variable | major |
Undocumented |
Instance Variable | minor |
Undocumented |
Instance Variable | pre_release |
Undocumented |
Instance Variable | version |
Undocumented |
Instance Variable | vstring |
Undocumented |