Skip to content
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

Open
wronk opened this issue Apr 20, 2017 · 3 comments
Open

Sorting events with np.sort #55

wronk opened this issue Apr 20, 2017 · 3 comments

Comments

@wronk
Copy link

wronk commented Apr 20, 2017

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:

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]])
@dengemann
Copy link
Member

dengemann commented Apr 20, 2017 via email

@wronk
Copy link
Author

wronk commented Apr 20, 2017

Alright, I'll put in a PR tomorrow or Monday.

@dengemann
Copy link
Member

dengemann commented Apr 20, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants