def load_schalk_run(edf, run):
  '''Read an EDF+ file corresponding to a run, and return a proper dataset.'''
  task_dic = TASKS[1 - run]
  log.debug('Processing run %d, with dictionary %s' % (run, task_dic))
  d = eegtools.io.load_edf(edf)

  fs, events = d.sample_rate, []
  for (start, duration, texts) in  d.annotations:
    for label in texts:
      events.append(
        (task_dic[str(label)], start * fs, (start + duration) * fs))
  return d, np.asarray(events, int).T.reshape(3, -1)
dataset/ETHPy150Open breuderink/eegtools/eegtools/data/schalk_physiobank.py/load_schalk_run/swapped operands of `-`