Is there a way to let Numpy know that a column is sorted when doing a slice? Presumably it could then slice faster?

后端 未结 0 716
说谎
说谎 2020-12-04 02:48

For example:

arr = np.array([[0,1],[0,2],[0,3],[1,4],[1,5],[2,6],[3,7]])
arr2 = arr[arr[:,0]==1]

In this example its very fast as is, but if

相关标签:
回答
  • 消灭零回复
提交回复
热议问题