What's the time complexity of indexing a numpy array directly

前端 未结 3 971
情话喂你
情话喂你 2021-01-02 07:06

I assume when having a numpy array, let\'s say

>>>>nArray
array([[  23425.     ,  521331.40625],
       [  23465.     ,  521246.03125],
       [         


        
3条回答
  •  忘掉有多难
    2021-01-02 07:34

    There is no hash table involved. Numpy arrays are arrays, just like the name implies, and the address is computed like this:

    address of nArray[x, y] = base address + A * x + B * y
    

提交回复
热议问题