diff options
author | Eric Wieser <wieser.eric@gmail.com> | 2018-04-11 00:52:35 -0700 |
---|---|---|
committer | Eric Wieser <wieser.eric@gmail.com> | 2018-04-12 00:43:31 -0700 |
commit | 056babb57ad8e800d3819484f8c6da9b0c3948d5 (patch) | |
tree | dc475a025ece2cd9d96b19766824843060ba973d /numpy/doc/structured_arrays.py | |
parent | 265983b4ec859ad528623f3c5da7c96f83526f4f (diff) | |
download | numpy-056babb57ad8e800d3819484f8c6da9b0c3948d5.tar.gz |
BUG: have _array_from_buffer_3118 correctly handle errors
Fixes gh-6741
If an object claims to support the PEP3118 buffer protocol, then any mistakes in the implementation should be raised as errors, rather than falling back on other approaches.
This has some behavior changes:
* np.array(mem_view_33d) now gives a more useful error message than "memoryview: unsupported format <B"
* np.array(ctypes_pointer) now errors rather than creating an object array containing a single pointer
Also adds support for 32-dimensional buffers, where previously the max was 31-dimensional.
Diffstat (limited to 'numpy/doc/structured_arrays.py')
0 files changed, 0 insertions, 0 deletions