def get_distributions_for_columns(data, columns):
 domain = data.domain
 columns = [(col if isinstance(col, int) else domain.index(col)) for col in columns]
 try:
  dist_unks = data._compute_distributions(columns)
 except NotImplementedError:
  return [get_distribution(data, i) for i in columns]
 else:
  return [get_distribution(dist, domain[col], unknown) for (col, (dist, unknown)) in zip(columns, dist_unks)]

def get_distributions_for_columns ( data , columns ) : domain = data . domain columns = [ ( col if isinstance ( col , int ) else domain . index ( col ) ) for col in columns ] try : dist_unks = data . _compute_distributions ( columns ) except NotImplementedError : return [ get_distribution ( data , i ) for i in columns ] else : return [ get_distribution ( dist , domain [ col ] , unknown ) for ( col , ( dist , unknown ) ) in zip ( columns , dist_unks ) ]
compute the distributions for columns .