Created
April 3, 2017 02:46
-
-
Save agibsonccc/1cd490d7a4a25d37898992a9fef845f9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In [34]: pointer, read_only_flag = a.__array_interface__['data'] | |
...: | |
In [35]: buffer_pointer = native_ops.pointerForAddress(pointer) | |
In [36]: as_double = DoublePointer(buffer_pointer) | |
In [37]: as_double.get(0) | |
Out[37]: 1.0 | |
In [38]: as_double.get(1) | |
Out[38]: 2.0 | |
In [39]: a | |
Out[39]: | |
array([[ 1., 2.], | |
[ 3., 4.]]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment