Skip to content

Instantly share code, notes, and snippets.

@agibsonccc
Created April 2, 2017 11:38
Show Gist options
  • Save agibsonccc/01fe66698011c9c4fca8334a2d41b57f to your computer and use it in GitHub Desktop.
Save agibsonccc/01fe66698011c9c4fca8334a2d41b57f to your computer and use it in GitHub Desktop.
[8]: a = np.linspace(1,4,4).reshape(2,2)
In [9]: pointer, read_only_flag = a.__array_interface__['data']
In [10]: type(pointer)
Out[10]: int
In [11]: a_pointer_for_nd4j = native_ops.pointerForAddress(pointer)
In [12]: a_pointer_for_nd4j
Out[12]: <org.bytedeco.javacpp.Pointer at 0x7f83e9e1d770 jclass=org/bytedeco/javacpp/Pointer jself=<LocalRef obj=0x562f5ee8a298 at 0x7f841ecc08b0>>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment