本文整理汇总了Python中numpy.lib.NumpyVersion方法的典型用法代码示例。如果您正苦于以下问题:Python lib.NumpyVersion方法的具体用法?Python lib.NumpyVersion怎么用?Python lib.NumpyVersion使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类numpy.lib
的用法示例。
在下文中一共展示了lib.NumpyVersion方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_main_versions
# 需要导入模块: from numpy import lib [as 别名]
# 或者: from numpy.lib import NumpyVersion [as 别名]
def test_main_versions():
assert_(NumpyVersion('1.8.0') == '1.8.0')
for ver in ['1.9.0', '2.0.0', '1.8.1']:
assert_(NumpyVersion('1.8.0') < ver)
for ver in ['1.7.0', '1.7.1', '0.9.9']:
assert_(NumpyVersion('1.8.0') > ver)
示例2: test_version_1_point_10
# 需要导入模块: from numpy import lib [as 别名]
# 或者: from numpy.lib import NumpyVersion [as 别名]
def test_version_1_point_10():
# regression test for gh-2998.
assert_(NumpyVersion('1.9.0') < '1.10.0')
assert_(NumpyVersion('1.11.0') < '1.11.1')
assert_(NumpyVersion('1.11.0') == '1.11.0')
assert_(NumpyVersion('1.99.11') < '1.99.12')
示例3: test_alpha_beta_rc
# 需要导入模块: from numpy import lib [as 别名]
# 或者: from numpy.lib import NumpyVersion [as 别名]
def test_alpha_beta_rc():
assert_(NumpyVersion('1.8.0rc1') == '1.8.0rc1')
for ver in ['1.8.0', '1.8.0rc2']:
assert_(NumpyVersion('1.8.0rc1') < ver)
for ver in ['1.8.0a2', '1.8.0b3', '1.7.2rc4']:
assert_(NumpyVersion('1.8.0rc1') > ver)
assert_(NumpyVersion('1.8.0b1') > '1.8.0a2')
示例4: test_dev_version
# 需要导入模块: from numpy import lib [as 别名]
# 或者: from numpy.lib import NumpyVersion [as 别名]
def test_dev_version():
assert_(NumpyVersion('1.9.0.dev-Unknown') < '1.9.0')
for ver in ['1.9.0', '1.9.0a1', '1.9.0b2', '1.9.0b2.dev-ffffffff']:
assert_(NumpyVersion('1.9.0.dev-f16acvda') < ver)
assert_(NumpyVersion('1.9.0.dev-f16acvda') == '1.9.0.dev-11111111')
示例5: test_dev_a_b_rc_mixed
# 需要导入模块: from numpy import lib [as 别名]
# 或者: from numpy.lib import NumpyVersion [as 别名]
def test_dev_a_b_rc_mixed():
assert_(NumpyVersion('1.9.0a2.dev-f16acvda') == '1.9.0a2.dev-11111111')
assert_(NumpyVersion('1.9.0a2.dev-6acvda54') < '1.9.0a2')
示例6: test_dev0_a_b_rc_mixed
# 需要导入模块: from numpy import lib [as 别名]
# 或者: from numpy.lib import NumpyVersion [as 别名]
def test_dev0_a_b_rc_mixed():
assert_(NumpyVersion('1.9.0a2.dev0+f16acvda') == '1.9.0a2.dev0+11111111')
assert_(NumpyVersion('1.9.0a2.dev0+6acvda54') < '1.9.0a2')
示例7: test_raises
# 需要导入模块: from numpy import lib [as 别名]
# 或者: from numpy.lib import NumpyVersion [as 别名]
def test_raises():
for ver in ['1.9', '1,9.0', '1.7.x']:
assert_raises(ValueError, NumpyVersion, ver)