def test_estimate_rank():
 data = np.eye(10)
 assert_array_equal(estimate_rank(data, return_singular=True)[1], np.ones(10))
 data[(0, 0)] = 0
 assert_equal(estimate_rank(data), 9)
 assert_raises(ValueError, estimate_rank, data, 'foo')

def test_estimate_rank ( ) : data = np . eye ( 10 ) assert_array_equal ( estimate_rank ( data , return_singular = True ) [ 1 ] , np . ones ( 10 ) ) data [ ( 0 , 0 ) ] = 0 assert_equal ( estimate_rank ( data ) , 9 ) assert_raises ( ValueError , estimate_rank , data , 'foo' )
test rank estimation .