#NEWLINE# def setUp( self ) : #NEWLINE# #INDENT# eigvals = pd . Series ( [ 0.0961330159181 , 0.0409418140138 ] , [ 'CA1' , 'CA2' ] ) #NEWLINE# features = np . array ( [ [ 0.408869425742 , 0.0695518116298 ] , [ ( - 0.1153860437 ) , ( - 0.299767683538 ) ] , [ ( - 0.309967102571 ) , 0.187391917117 ] ] ) #NEWLINE# samples = np . array ( [ [ ( - 0.848956053187 ) , 0.882764759014 ] , [ ( - 0.220458650578 ) , ( - 1.34482000302 ) ] , [ 1.66697179591 , 0.470324389808 ] ] ) #NEWLINE# features_ids = [ 'Species1' , 'Species2' , 'Species3' ] #NEWLINE# sample_ids = [ 'Site1' , 'Site2' , 'Site3' ] #NEWLINE# samples_df = pd . DataFrame ( samples , index = sample_ids , columns = [ 'CA1' , 'CA2' ] ) #NEWLINE# features_df = pd . DataFrame ( features , index = features_ids , columns = [ 'CA1' , 'CA2' ] ) #NEWLINE# self . ordination_results = OrdinationResults ( 'CA' , 'Correspondance Analysis' , eigvals = eigvals , samples = features_ids , features = features_df ) #NEWLINE# self . df = pd . DataFrame ( [ [ 'foo' , '42' , 10 ] , [ 22 , 0 , 8 ] , [ 22 , ( - 4.2 ) , np . nan ] , [ 'foo' , '42.19' , 11 ] ] , index = [ 'A' , 'B' , 'C' , 'D' ] , columns = [ 'categorical' , 'numeric' , 'nancolumn' ] ) #NEWLINE# eigvals = np . array ( [ 0.5 , 0.25 , 0.25 ] ) #NEWLINE# samples = np . array ( [ [ 0.1 , 0.2 , 0.3 ] , [ 0.2 , 0.3 , 0.4 ] , [ 0.3 , 0.4 , 0.5 ] , [ 0.4 , 0.5 , 0.6 ] ] ) #NEWLINE# samples_df = pd . DataFrame ( samples , [ 'A' , 'B' , 'C' , 'D' ] , [ 'PC1' , 'PC2' , 'PC3' ] ) #NEWLINE# self . min_ord_results = OrdinationResults ( 'PCoA' , 'Principal Coordinate Analysis' , eigvals , samples_df )