本文整理匯總了Python中numpy.testing.TestCase類的典型用法代碼示例。如果您正苦於以下問題:Python TestCase類的具體用法?Python TestCase怎麽用?Python TestCase使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
在下文中一共展示了TestCase類的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: __init__
def __init__(self, *args, **kw):
TestCase.__init__(self, *args, **kw)
self.a = array([[1,2,3],[1,2,3],[2,5,6]])
self.ca = array([[1,2,3],[1,2,3],[2,5j,6]])
# Those matrices are more robust to detect problems in permutation
# matrices than the ones above
self.b = array([[1,2,3],[4,5,6],[7,8,9]])
self.cb = array([[1j,2j,3j],[4j,5j,6j],[7j,8j,9j]])
# Reectangular matrices
self.hrect = array([[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 12, 12]])
self.chrect = 1.j * array([[1, 2, 3, 4], [5, 6, 7, 8], [9, 10, 12, 12]])
self.vrect = array([[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 12, 12]])
self.cvrect = 1.j * array([[1, 2, 3], [4, 5, 6], [7, 8, 9], [10, 12, 12]])
# Medium sizes matrices
self.med = rand(30, 40)
self.cmed = rand(30, 40) + 1.j * rand(30, 40)
示例2: __init__
def __init__(self, *args, **kwargs):
TestCase.__init__(self, *args, **kwargs)
示例3: __init__
def __init__(self, *args, **kwds):
TestCase.__init__(self, *args, **kwds)
self.setup()
示例4: __init__
def __init__(self, *args, **kwargs):
TestCase.__init__(self, *args, **kwargs)
CheckDeriv.__init__(self)