diff options
Diffstat (limited to 'numpy/lib/_version.py')
-rw-r--r-- | numpy/lib/_version.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/numpy/lib/_version.py b/numpy/lib/_version.py index d4098acb5..bfac5f814 100644 --- a/numpy/lib/_version.py +++ b/numpy/lib/_version.py @@ -15,7 +15,7 @@ class NumpyVersion(): """Parse and compare numpy version strings. NumPy has the following versioning scheme (numbers given are examples; they - can be > 9) in principle): + can be > 9 in principle): - Released version: '1.8.0', '1.8.1', etc. - Alpha: '1.8.0a1', '1.8.0a2', etc. @@ -54,7 +54,7 @@ class NumpyVersion(): def __init__(self, vstring): self.vstring = vstring - ver_main = re.match(r'\d[.]\d+[.]\d+', vstring) + ver_main = re.match(r'\d+\.\d+\.\d+', vstring) if not ver_main: raise ValueError("Not a valid numpy version string") @@ -151,5 +151,5 @@ class NumpyVersion(): def __ge__(self, other): return self._compare(other) >= 0 - def __repr(self): + def __repr__(self): return "NumpyVersion(%s)" % self.vstring |