def test_creation_args():
 raises(ValueError, (lambda : zeros(3, (-1))))
 raises(TypeError, (lambda : zeros(1, 2, 3, 4)))
 assert (zeros(long(3)) == zeros(3))
 assert (zeros(Integer(3)) == zeros(3))
 assert (zeros(3.0) == zeros(3))
 assert (eye(long(3)) == eye(3))
 assert (eye(Integer(3)) == eye(3))
 assert (eye(3.0) == eye(3))
 assert (ones(long(3), Integer(4)) == ones(3, 4))
 raises(TypeError, (lambda : Matrix(5)))
 raises(TypeError, (lambda : Matrix(1, 2)))

def test_creation_args ( ) : raises ( ValueError , ( lambda : zeros ( 3 , ( - 1 ) ) ) ) raises ( TypeError , ( lambda : zeros ( 1 , 2 , 3 , 4 ) ) ) assert ( zeros ( long ( 3 ) ) == zeros ( 3 ) ) assert ( zeros ( Integer ( 3 ) ) == zeros ( 3 ) ) assert ( zeros ( 3.0 ) == zeros ( 3 ) ) assert ( eye ( long ( 3 ) ) == eye ( 3 ) ) assert ( eye ( Integer ( 3 ) ) == eye ( 3 ) ) assert ( eye ( 3.0 ) == eye ( 3 ) ) assert ( ones ( long ( 3 ) , Integer ( 4 ) ) == ones ( 3 , 4 ) ) raises ( TypeError , ( lambda : Matrix ( 5 ) ) ) raises ( TypeError , ( lambda : Matrix ( 1 , 2 ) ) )
check that matrix dimensions can be specified using any reasonable type .