<div dir="ltr">Thanks Jaakko!  That didn&#39;t quite work, but was close enough to help me figure it out. For the record, the working solution is:<div><br></div><div><font face="monospace"><br></font></div><div><div><font face="monospace"># set up dummy first trial to set array dimensions</font></div><div><font face="monospace">events_adj = [[0,0,0,]]</font></div><div><font face="monospace"><br></font></div><div><font face="monospace">for key, value in event_id.items():</font></div><div><font face="monospace">    events_tmp, lag_tmp = mne.event.define_target_events(events, sound_onset, value, </font></div><div><font face="monospace">                                                  <a href="http://raw.info">raw.info</a>[&#39;sfreq&#39;], code_tmin, code_tmax,  </font></div><div><font face="monospace">                                                  new_id=event_id_adj[key], </font></div><div><font face="monospace">                                                  fill_na=None)</font></div><div><font face="monospace">    events_adj = numpy.concatenate((events_adj, events_tmp))</font></div></div><div><br></div><div><br></div><div>The trick was initialising the events_adj array with a [0, 0, 0] entry, otherwise the np.concatenate call fails. This doesn&#39;t strike me as the most elegant solution, but it does work!</div><div><br></div><div>Also, you were correct that there&#39;s no need to sort the new events array afterwards; MNE manages just fine.</div><div><br></div><div>Best,</div><div>Aaron</div></div><div dir="ltr">-- <br></div><div data-smartmail="gmail_signature"><div dir="ltr"><div><span id="inbox-inbox-inbox-inbox-inbox-docs-internal-guid-24861e78-8731-8fad-d2f6-a8e361dd9342"><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(0,0,0);font-weight:700;vertical-align:baseline;white-space:pre-wrap;background-color:transparent">Aaron J Newman, PhD</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(102,102,102);vertical-align:baseline;white-space:pre-wrap;background-color:transparent">Professor </span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(102,102,102);vertical-align:baseline;white-space:pre-wrap;background-color:transparent">Director, RADIANT CREATE Neurotechnology Innovation Training Program</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(102,102,102);vertical-align:baseline;white-space:pre-wrap;background-color:transparent">Director, NeuroCognitive Imaging Lab (NCIL)</span></p><br><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(102,102,102);vertical-align:baseline;white-space:pre-wrap;background-color:transparent">FACULTY OF SCIENCE</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(102,102,102);vertical-align:baseline;white-space:pre-wrap;background-color:transparent">Department of Psychology &amp; Neuroscience</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(102,102,102);vertical-align:baseline;white-space:pre-wrap;background-color:transparent">FACULTY OF MEDICINE</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(102,102,102);vertical-align:baseline;white-space:pre-wrap;background-color:transparent">Departments of Pediatrics, Psychiatry, and Surgery</span></p><br><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(102,102,102);vertical-align:baseline;white-space:pre-wrap;background-color:transparent"><a href="mailto:Aaron.Newman@dal.ca">Aaron.Newman@dal.ca</a></span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(102,102,102);vertical-align:baseline;white-space:pre-wrap;background-color:transparent">+1.902.488.1973 | fax: +1.902.494.6585</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(102,102,102);vertical-align:baseline;white-space:pre-wrap;background-color:transparent">Box 15000, Life Sciences Centre, Halifax NS B3H 4R2 Canada</span></p><br><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12px;font-family:arial;color:rgb(241,194,50);font-weight:700;vertical-align:baseline;white-space:pre-wrap;background-color:transparent">DALHOUSIE UNIVERSITY</span></p><p dir="ltr" style="line-height:1.2;margin-top:0pt;margin-bottom:0pt"><a href="http://ncil.science/" style="text-decoration:none"><span style="font-size:12px;font-family:arial;color:rgb(102,102,102);text-decoration:underline;vertical-align:baseline;white-space:pre-wrap;background-color:transparent">NCIL.science</span></a></p><a href="http://www.dal.ca/RADIANT" style="text-decoration:none"><span style="font-size:12px;font-family:arial;color:rgb(102,102,102);text-decoration:underline;vertical-align:baseline;white-space:pre-wrap;background-color:transparent">dal.ca/RADIANT</span></a></span><br></div></div></div>