I know for Python version, you can
if sys.version_info < (2,8):
print 'there will be no Python 2.8!'
But, is there a similar way to do this for a module?
Right now I am doing something like:
# in case like '1.8.1rc', need to filter for numbers
ver = [int(filter(lambda x : x.isdigit(), n)) for n in np.__version__.split('.')]
ver.reverse()
if sum([v * 10 ** n for n,v in enumerate(ver)]) < 181:
print "np.unique before gh-2799: allow using unique with lists of complex"