Here describes the PyArrayObject struct.
In a Python session, I have the following:
>>> t_ar1 = np.linspace(0, 15, 16).reshape((4, 4))
>>> print(hex_fmt(string_at(id(t_ar1), 80).hex()))
0100000000000000
40b06eecbd7f0000
3053b973bf550000
02000000ffffffff
70eaa873bf550000
80eaa873bf550000
50c826adbd7f0000
00b66eecbd7f0000
01050000322c2033
0000000000000000
From my understanding, the third line is a pointer to the actual data of the array. Viewing the data there, I find
>>> print(hex_fmt(string_at(id(0x55bf73b95330), 96).hex()))
0200000000000000
4049a801be7f0000
0200000000000000
3053b933fd560100
489601adbd7f0000
10ab27adbd7f0000
0000000000000000
0000000000000000
d09501adbd7f0000
b0aa27adbd7f0000
0000000000000000
0000000000000000
Here, I'm expecting to see the floating point numbers 0.0 - 15.0 somewhere. However, I can't seem to find them. What's going on here?
hex_fmtandstring_at?string_atis from the ctypes module.hex_fmtjust pretty-prints the hex (it's unimportant).