You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If there's no buffer interface, try __array_interface__ instead
To
Try to get a PEP3118 memory view
Try to convert the buffer interface into an array
If the buffer interface is not correct, fail and tell the user that something is wrong
If there's no buffer interface, try __array_interface__ instead
This means that objects which incorrectly implement the buffer interface now fail loudly, rather than silently-or-with-abort().
Unfortunately, prior to python/cpython#31, (before 2.7.14 / 3.6.3 / 3.7.0) ctypes did not implement the buffer interface correctly for integer types (the format and itemsize didn't match)
Do we have a minimum supported patch version of python? If so, should we enable tests for it so that this doesn't happen again?
#10882 changed the behavior of
np.arrayfrom.__array_interface__insteadabort()due to bad error silencing (ctypeslib.as_array aborts #6741)__array_interface__insteadTo
__array_interface__insteadThis means that objects which incorrectly implement the buffer interface now fail loudly, rather than silently-or-with-abort().
Unfortunately, prior to python/cpython#31, (before 2.7.14 / 3.6.3 / 3.7.0) ctypes did not implement the buffer interface correctly for integer types (the format and itemsize didn't match)
Do we have a minimum supported patch version of python? If so, should we enable tests for it so that this doesn't happen again?