def test_infomax_weights_ini():
 X = np.random.random((3, 100))
 weights = np.array([[1, 2, 3], [4, 5, 6], [7, 8, 9]], dtype=np.float64)
 w1 = infomax(X, max_iter=0, weights=weights, extended=True)
 w2 = infomax(X, max_iter=0, weights=weights, extended=False)
 assert_almost_equal(w1, weights)
 assert_almost_equal(w2, weights)

def test_infomax_weights_ini ( ) : X = np . random . random ( ( 3 , 100 ) ) weights = np . array ( [ [ 1 , 2 , 3 ] , [ 4 , 5 , 6 ] , [ 7 , 8 , 9 ] ] , dtype = np . float64 ) w1 = infomax ( X , max_iter = 0 , weights = weights , extended = True ) w2 = infomax ( X , max_iter = 0 , weights = weights , extended = False ) assert_almost_equal ( w1 , weights ) assert_almost_equal ( w2 , weights )
test the infomax algorithm when user provides an initial weights matrix .