Skip to content

Sorting events with np.sort #55

@wronk

Description

@wronk

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]])

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions