-
-
Notifications
You must be signed in to change notification settings - Fork 10.8k
BUG: Conversion from ndpointer to array is broken in 1.15 #12421
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
Comments
eric-wieser
added a commit
to eric-wieser/numpy
that referenced
this issue
Nov 21, 2018
This: * fixes a regression in 1.15, where it became impossible to set the return value of a cdll function to an ndpointer. * removes ndpointer.__array_interface__, which was being ignored anyway in favor of the PEP3118 buffer protocol * adds `ndpointer.contents` to recover the lost functionality, while staying in line with the ctypes behavior * removes another instance of `descr`, which enables overlapping fields to be returned from C functions (such as unions). * Fixes a long-term bug where using ndpointer as a return type without specifying both type and dtype would produce an object array containing a single `ndpointer`. Now the ndpointer is returned directly. This relates to numpygh-12421, and likely fixes toinsson/pyrealsense#82
Should be closed as won't fix? Going to remove the 1.16 milestone. |
Probably needs no milestone - can just leave it open in case anyone has the problem and wants to argue here why we ought to fix it |
This was said to be a |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
This code:
Gives
This is problematic, because it breaksfixed in #12431ndpointer._check_retval_
, which is needed by toinsson/pyrealsense#82.This is an example of the problems predicted in #11150
The new spelling is
nd_ptr.contents
, which is consistent with how ctypes handles other pointer types.The text was updated successfully, but these errors were encountered: