def read_marginals_file(filename):
 with open(filename) as lines:
  return [float(line) for line in lines]

def read_marginals_file ( filename ) : with open ( filename ) as lines : return [ float ( line ) for line in lines ]
reads text file with one number per line to an array .