#NEWLINE# def test_book_example_dataset( self ) : #NEWLINE# #INDENT# eigvals = [ 0.73599103 , 0.26260032 , 0.14926222 , 0.06990457 , 0.02956972 , 0.01931184 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 ] #NEWLINE# proportion_explained = [ 0.58105792 , 0.20732046 , 0.1178411 , 0.05518899 , 0.02334502 , 0.01524651 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 , 0.0 ] #NEWLINE# sample_ids = [ str ( i ) for i in range ( 14 ) ] #NEWLINE# axis_labels = [ ( 'PC%d' % i ) for i in range ( 1 , 15 ) ] #NEWLINE# expected_results = OrdinationResults ( short_method_name = 'PCoA' , long_method_name = 'Principal Coordinate Analysis' , eigvals = pd . Series ( eigvals , index = axis_labels ) , samples = pd . DataFrame ( np . loadtxt ( get_data_path ( 'exp_PCoAzeros_site' ) ) , index = sample_ids , columns = axis_labels ) , proportion_explained = pd . Series ( proportion_explained , index = axis_labels ) ) #NEWLINE# results = npt . assert_warns ( RuntimeWarning , pcoa , self . dm ) #NEWLINE# results . samples = np . abs ( results . samples ) #NEWLINE# assert_ordination_results_equal ( results , eigvals , ignore_directionality = True )