def get_log_transform(otu_table):
 if (otu_table.nnz == 0):
  raise ValueError('All values in the OTU table are zero!')
 def h(s_v, s_id, s_md):
  return np.log10(s_v)
 return otu_table.transform(h, axis='sample', inplace=False)

def get_log_transform ( otu_table ) : if ( otu_table . nnz == 0 ) : raise ValueError ( 'All values in the OTU table are zero!' ) def h ( s_v , s_id , s_md ) : return np . log10 ( s_v ) return otu_table . transform ( h , axis = 'sample' , inplace = False )
returns log10 of the data .