當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。