Behavior of ndarray.data for views in numpy

后端 未结 2 960
慢半拍i
慢半拍i 2021-01-22 20:02

I am trying to understand the meaning of ndarray.data field in numpy (see memory layout section of the reference page on N-dimensional arrays), especially for views

2条回答
  •  灰色年华
    2021-01-22 20:25

    is a memoryview object located at address 0x000000F2F5150348; the buffer it provides access to is located somewhere else.

    Memoryviews provide a number of operations described in the relevant official documentation, but at least on the Python-side API, they do not provide any way to access the raw address of the memory they expose. Particularly, the at whatevernumber number is not what you're looking for.

提交回复
热议问题