当前位置: 首页>>代码示例>>Python>>正文


Python lib.NumpyVersion方法代码示例

本文整理汇总了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) 
开发者ID:Frank-qlu,项目名称:recruit,代码行数:9,代码来源:test__version.py

示例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') 
开发者ID:Frank-qlu,项目名称:recruit,代码行数:8,代码来源:test__version.py

示例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') 
开发者ID:Frank-qlu,项目名称:recruit,代码行数:11,代码来源:test__version.py

示例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') 
开发者ID:Frank-qlu,项目名称:recruit,代码行数:8,代码来源:test__version.py

示例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') 
开发者ID:Frank-qlu,项目名称:recruit,代码行数:5,代码来源:test__version.py

示例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') 
开发者ID:Frank-qlu,项目名称:recruit,代码行数:5,代码来源:test__version.py

示例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) 
开发者ID:Frank-qlu,项目名称:recruit,代码行数:5,代码来源:test__version.py


注:本文中的numpy.lib.NumpyVersion方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。