numpy配列を作成しました::
a=np.ndarray([2,3])
次に、そのデータがどこにあるかを確認したい::
a.data
>>>Out[213]: <read-write buffer for 0x0482C1D0, size 48, offset 0 at 0x049E87A0>
a.data
>>>Out[214]: <read-write buffer for 0x0482C1D0, size 48, offset 0 at 0x049E82A0>
a.data
>>>Out[215]: <read-write buffer for 0x0482C1D0, size 48, offset 0 at 0x049E81C0>
..。
なぜオフセットアドレスが異なるのですか?c_typesを使用してデータをac関数に転送する場合::
ctypes_array = (ctypes.c_char * a.size * 8).from_address(ptr)
ptrの値を取得するにはどうすればよいですか?