mzechmeister/python

wstat.py: invalid literal for int() with base 10: '0rc1'

Closed this issue · 2 comments

The ValueError rises in:

einsum_bug = tuple(map(int, np.__version__.split("."))) < (1, 7, 0)

Similar issue was reported in
mher/flower#791
See also:
https://stackoverflow.com/questions/11887762/how-do-i-compare-version-numbers-in-python/11887885#11887885

As a quick hack one could replace the line simply with

einsum_bug = False

The actual numpy version is 1.15.0. So version 1.7.0 seems rather old and this check might be removed completely.

The problem was that the version number can look like 1.19.0rc1 and the last field can not be converted to int.

The fix just ingores the last field

einsum_bug = tuple(map(int, np.__version__.split(".")[:2])) < (1, 7)