def get_taxa_coords(tax_counts, sample_coords):
 tax_counts = apply_along_axis((lambda x: (x / float(sum(x)))), 0, tax_counts)
 tax_ratios = apply_along_axis((lambda x: (x / float(sum(x)))), 1, tax_counts)
 return dot(tax_ratios, sample_coords)

def get_taxa_coords ( tax_counts , sample_coords ) : tax_counts = apply_along_axis ( ( lambda x : ( x / float ( sum ( x ) ) ) ) , 0 , tax_counts ) tax_ratios = apply_along_axis ( ( lambda x : ( x / float ( sum ( x ) ) ) ) , 1 , tax_counts ) return dot ( tax_ratios , sample_coords )
returns the pcoa coords of each taxon based on the coords of the samples .