<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Apr 5, 2016 at 12:19 PM, Chris Holdgraf <span dir="ltr">&lt;<a href="mailto:choldgraf@berkeley.edu" target="_blank">choldgraf@berkeley.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">sometimes it&#39;s more useful to return arrays.</div></blockquote><div><br></div>Sure, but that&#39;s why there is a get_data method, right?  IMO the 
docstring reflects how I expected it to work before even reading the 
docstring, so my vote would be to make .next() actually do that, rather 
than changing the docstring to reflect what it does currently.  Issue 
created: <a href="https://github.com/mne-tools/mne-python/issues/3099" target="_blank">https://github.com/mne-tools/mne-python/issues/3099</a><div class=""><div id=":1t0" class="" tabindex="0"><img class="" src="https://ssl.gstatic.com/ui/v1/icons/mail/images/cleardot.gif"> <br></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Tue, Apr 5, 2016 at 12:03 PM, Dan McCloy <span dir="ltr">&lt;<a href="mailto:drmccloy@uw.edu" target="_blank">drmccloy@uw.edu</a>&gt;</span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div><div class="h5"><div dir="ltr"><div><div><div><div>I was puzzled today why this works...<br><br></div><div>for ix, _ in enumerate(epochs):<br></div><div>    new_epoch = epochs[ix].crop(tmin, tmax, copy=True)<br></div><div><br></div>... but this does not:<br><br></div>for epoch in epochs:<br></div>    new_epoch = epoch.crop(..., copy=True)<br><br>AttributeError: &#39;numpy.ndarray&#39; object has no attribute &#39;crop&#39;<br><br></div>According to the docs, Epochs.next() is supposed to return an instance of the epochs object, but it doesn&#39;t: looking at the code, it actually returns something like self._data[self._current].  I would have expected it to return something like self.__get_item__(self._current).  So are the docs wrong, or is the definition of Epochs.next() implemented wrong?<br><br>Daniel McCloy<br><a href="http://dan.mccloy.info/" target="_blank">http://dan.mccloy.info/</a><br>Postdoctoral Research Associate<br>Institute for Learning and Brain Sciences<br>University of Washington<br><br></div>
<br></div></div>_______________________________________________<br>
Mne_analysis mailing list<br>
<a href="mailto:Mne_analysis@nmr.mgh.harvard.edu" target="_blank">Mne_analysis@nmr.mgh.harvard.edu</a><br>
<a href="https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis" rel="noreferrer" target="_blank">https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis</a><br>
<br>
<br>
The information in this e-mail is intended only for the person to whom it is<br>
addressed. If you believe this e-mail was sent to you in error and the e-mail<br>
contains patient information, please contact the Partners Compliance HelpLine at<br>
<a href="http://www.partners.org/complianceline" rel="noreferrer" target="_blank">http://www.partners.org/complianceline</a> . If the e-mail was sent to you in error<br>
but does not contain patient information, please contact the sender and properly<br>
dispose of the e-mail.<br>
<br></blockquote></div><span class=""><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div><div dir="ltr"><div><div dir="ltr"><div><span style="color:rgb(136,136,136);font-size:13px;background-color:rgb(255,255,255)"><font face="garamond, serif">_____________________________________</font></span></div><div><font face="garamond, serif" color="#888888"><br></font></div><div><font face="garamond, serif" color="#666666">PhD Candidate in Neuroscience | <a href="http://hwni.org/" target="_blank">UC Berkeley</a></font></div><div><font face="garamond, serif" color="#666666">Editor and Web Director | <a href="http://sciencereview.berkeley.edu/" target="_blank">Berkeley Science Review</a></font></div><div><span style="color:rgb(136,136,136);font-size:13px;background-color:rgb(255,255,255)"><font face="garamond, serif">_____________________________________</font></span></div></div></div></div></div>
</font></span></div>
<br>_______________________________________________<br>
Mne_analysis mailing list<br>
<a href="mailto:Mne_analysis@nmr.mgh.harvard.edu">Mne_analysis@nmr.mgh.harvard.edu</a><br>
<a href="https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis" rel="noreferrer" target="_blank">https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis</a><br>
<br>
<br>
The information in this e-mail is intended only for the person to whom it is<br>
addressed. If you believe this e-mail was sent to you in error and the e-mail<br>
contains patient information, please contact the Partners Compliance HelpLine at<br>
<a href="http://www.partners.org/complianceline" rel="noreferrer" target="_blank">http://www.partners.org/complianceline</a> . If the e-mail was sent to you in error<br>
but does not contain patient information, please contact the sender and properly<br>
dispose of the e-mail.<br>
<br></blockquote></div><br></div></div>