#NEWLINE# def test_initialize_close( ) : #NEWLINE# #INDENT# A = np . abs ( random_state . randn ( 10 , 10 ) ) #NEWLINE# ( W , H ) = nmf . _initialize_nmf ( A , 10 , init = 'nndsvd' ) #NEWLINE# error = linalg . norm ( ( np . dot ( W , H ) - H ) ) #NEWLINE# sdev = linalg . norm ( ( A - A . mean ( ) ) ) #NEWLINE# assert_true ( ( error <= sdev ) )