Skip to content Skip to sidebar Skip to footer
Showing posts with the label Matrix Indexing

Top K Indices Of A Multi-dimensional Tensor

I have a 2D tensor and I want to get the indices of the top k values. I know about pytorch's to… Read more Top K Indices Of A Multi-dimensional Tensor

Is There A Canonical Way Of Obtaining A 0d Numpy Subarray?

Given a numpy ndarray and an index: a = np.random.randint(0,4,(2,3,4)) idx = (1,1,1) is there a cl… Read more Is There A Canonical Way Of Obtaining A 0d Numpy Subarray?