-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sorting events with np.sort #55
Comments
It's a bug/misnomer/slip I think.
…On Thu, Apr 20, 2017 at 7:04 PM Mark Wronkiewicz ***@***.***> wrote:
In the plot_reproduce_erf.py tutorial, there's a line
<https://github.com/mne-tools/mne-hcp/blob/master/tutorials/plot_reproduce_erf.py#L118>
where the events are sorted as follows:
events = np.sort(events, 0)
Is this intended? It seems like this would break the relationship between
event time stamps (in 0-th column) and the event IDs (in 2nd column) --
calling the np.sort function in this way will only sort the 0th column
while leaving all other columns the same.
Example:
In [47]: temp
Out[47]:
array([[6, 1],
[5, 2],
[4, 3]])
In [48]: np.sort(temp, 0)
Out[48]:
array([[4, 1],
[5, 2],
[6, 3]])
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#55>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AB0fitCxrUSQmUdli0Gj9AeglUnG6DG-ks5rx-RigaJpZM4NDrc_>
.
|
Alright, I'll put in a PR tomorrow or Monday. |
Important is that things are sorted by time stamp. It should increase the
correlation in the plots at the end.
…On Thu, Apr 20, 2017 at 7:11 PM Mark Wronkiewicz ***@***.***> wrote:
Alright, I'll put in a PR tomorrow or Monday.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#55 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AB0fit0zpDVMuHAKfbwbdp24avEFg2wIks5rx-YygaJpZM4NDrc_>
.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In the
plot_reproduce_erf.py
tutorial, there's a line where the events are sorted as follows:events = np.sort(events, 0)
Is this intended? It seems like this would break the relationship between event time stamps (in 0-th column) and the event IDs (in 2nd column) -- calling the
np.sort
function in this way will only sort the 0th column while leaving all other columns the same.Example:
The text was updated successfully, but these errors were encountered: