提交 1f7ecf7b authored 作者: Tanjay94's avatar Tanjay94

Fixed indentation.

上级 b0135237
......@@ -6903,21 +6903,20 @@ if __name__ == '__main__':
class T_swapaxes(unittest.TestCase):
def test_no_dimensional_input(self):
self.assertRaises(IndexError, swapaxes, 2, 0, 1)
self.assertRaises(IndexError, swapaxes, 2, 0, 1)
def test_unidimensional_input(self):
self.assertRaises(IndexError, swapaxes, [2, 1], 0, 1)
def test_unidimensional_input(self):
self.assertRaises(IndexError, swapaxes, [2, 1], 0, 1)
def test_not_enough_dimension(self):
self.assertRaises(IndexError, swapaxes, [[2, 1], [3, 4]], 3, 4)
def test_not_enough_dimension(self):
self.assertRaises(IndexError, swapaxes, [[2, 1], [3, 4]], 3, 4)
def test_doubleswap(self):
y = matrix()
n = swapaxes(y, 0, 1)
f = function([y], n)
testMatrix = [[2, 1], [3, 4]]
self.assertTrue(numpy.array_equal(testMatrix, f(f(testMatrix))))
def test_doubleswap(self):
y = matrix()
n = swapaxes(y, 0, 1)
f = function([y], n)
testMatrix = [[2, 1], [3, 4]]
self.assertTrue(numpy.array_equal(testMatrix, f(f(testMatrix))))
class T_Power():
def test_numpy_compare(self):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论