def read_labels(labelfile):
 fin = open(labelfile)
 lines = fin.readlines()
 labels = np.empty((len(lines),))
 k = 0
 for line in lines:
  labels[k] = int(line)
  k = (k + 1)
 fin.close()
 return labels

def read_labels ( labelfile ) : fin = open ( labelfile ) lines = fin . readlines ( ) labels = np . empty ( ( len ( lines ) , ) ) k = 0 for line in lines : labels [ k ] = int ( line ) k = ( k + 1 ) fin . close ( ) return labels
returns a list of strings arguments: labels_file -- path to a .