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


Python numerictypes.sctypes方法代码示例

本文整理汇总了Python中numpy.core.numerictypes.sctypes方法的典型用法代码示例。如果您正苦于以下问题:Python numerictypes.sctypes方法的具体用法?Python numerictypes.sctypes怎么用?Python numerictypes.sctypes使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在numpy.core.numerictypes的用法示例。


在下文中一共展示了numerictypes.sctypes方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: test_floats

# 需要导入模块: from numpy.core import numerictypes [as 别名]
# 或者: from numpy.core.numerictypes import sctypes [as 别名]
def test_floats(self):
        for t in sctypes['float']:
            assert_(isinstance(t(), numbers.Real),
                    "{0} is not instance of Real".format(t.__name__))
            assert_(issubclass(t, numbers.Real),
                    "{0} is not subclass of Real".format(t.__name__))
            assert_(not isinstance(t(), numbers.Rational),
                    "{0} is instance of Rational".format(t.__name__))
            assert_(not issubclass(t, numbers.Rational),
                    "{0} is subclass of Rational".format(t.__name__)) 
开发者ID:Frank-qlu,项目名称:recruit,代码行数:12,代码来源:test_abc.py

示例2: test_complex

# 需要导入模块: from numpy.core import numerictypes [as 别名]
# 或者: from numpy.core.numerictypes import sctypes [as 别名]
def test_complex(self):
        for t in sctypes['complex']:
            assert_(isinstance(t(), numbers.Complex),
                    "{0} is not instance of Complex".format(t.__name__))
            assert_(issubclass(t, numbers.Complex),
                    "{0} is not subclass of Complex".format(t.__name__))
            assert_(not isinstance(t(), numbers.Real),
                    "{0} is instance of Real".format(t.__name__))
            assert_(not issubclass(t, numbers.Real),
                    "{0} is subclass of Real".format(t.__name__)) 
开发者ID:Frank-qlu,项目名称:recruit,代码行数:12,代码来源:test_abc.py

示例3: test_int

# 需要导入模块: from numpy.core import numerictypes [as 别名]
# 或者: from numpy.core.numerictypes import sctypes [as 别名]
def test_int(self):
        for t in sctypes['int']:
            assert_(isinstance(t(), numbers.Integral),
                    "{0} is not instance of Integral".format(t.__name__))
            assert_(issubclass(t, numbers.Integral),
                    "{0} is not subclass of Integral".format(t.__name__)) 
开发者ID:Frank-qlu,项目名称:recruit,代码行数:8,代码来源:test_abc.py

示例4: test_uint

# 需要导入模块: from numpy.core import numerictypes [as 别名]
# 或者: from numpy.core.numerictypes import sctypes [as 别名]
def test_uint(self):
        for t in sctypes['uint']:
            assert_(isinstance(t(), numbers.Integral),
                    "{0} is not instance of Integral".format(t.__name__))
            assert_(issubclass(t, numbers.Integral),
                    "{0} is not subclass of Integral".format(t.__name__)) 
开发者ID:Frank-qlu,项目名称:recruit,代码行数:8,代码来源:test_abc.py

示例5: test_floats

# 需要导入模块: from numpy.core import numerictypes [as 别名]
# 或者: from numpy.core.numerictypes import sctypes [as 别名]
def test_floats(self):
        for t in sctypes['float']:
            assert_(isinstance(t(), numbers.Real), 
                    "{0} is not instance of Real".format(t.__name__))
            assert_(issubclass(t, numbers.Real),
                    "{0} is not subclass of Real".format(t.__name__))
            assert_(not isinstance(t(), numbers.Rational), 
                    "{0} is instance of Rational".format(t.__name__))
            assert_(not issubclass(t, numbers.Rational),
                    "{0} is subclass of Rational".format(t.__name__)) 
开发者ID:abhisuri97,项目名称:auto-alt-text-lambda-api,代码行数:12,代码来源:test_abc.py

示例6: test_complex

# 需要导入模块: from numpy.core import numerictypes [as 别名]
# 或者: from numpy.core.numerictypes import sctypes [as 别名]
def test_complex(self):
        for t in sctypes['complex']:
            assert_(isinstance(t(), numbers.Complex), 
                    "{0} is not instance of Complex".format(t.__name__))
            assert_(issubclass(t, numbers.Complex),
                    "{0} is not subclass of Complex".format(t.__name__))
            assert_(not isinstance(t(), numbers.Real), 
                    "{0} is instance of Real".format(t.__name__))
            assert_(not issubclass(t, numbers.Real),
                    "{0} is subclass of Real".format(t.__name__)) 
开发者ID:abhisuri97,项目名称:auto-alt-text-lambda-api,代码行数:12,代码来源:test_abc.py

示例7: test_int

# 需要导入模块: from numpy.core import numerictypes [as 别名]
# 或者: from numpy.core.numerictypes import sctypes [as 别名]
def test_int(self):
        for t in sctypes['int']:
            assert_(isinstance(t(), numbers.Integral), 
                    "{0} is not instance of Integral".format(t.__name__))
            assert_(issubclass(t, numbers.Integral),
                    "{0} is not subclass of Integral".format(t.__name__)) 
开发者ID:abhisuri97,项目名称:auto-alt-text-lambda-api,代码行数:8,代码来源:test_abc.py

示例8: test_uint

# 需要导入模块: from numpy.core import numerictypes [as 别名]
# 或者: from numpy.core.numerictypes import sctypes [as 别名]
def test_uint(self):
        for t in sctypes['uint']:
            assert_(isinstance(t(), numbers.Integral), 
                    "{0} is not instance of Integral".format(t.__name__))
            assert_(issubclass(t, numbers.Integral),
                    "{0} is not subclass of Integral".format(t.__name__)) 
开发者ID:abhisuri97,项目名称:auto-alt-text-lambda-api,代码行数:8,代码来源:test_abc.py


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