diff options
author | Alex Ford <fordas@uw.edu> | 2013-04-01 22:52:20 -0700 |
---|---|---|
committer | Alex Ford <fordas@uw.edu> | 2013-04-01 23:04:58 -0700 |
commit | 7dad2d3596ff09ef7a7e33c3dfb593a0ba6321f6 (patch) | |
tree | 788d45c08f49665175f8893f3afc310c701e1cec /numpy/_import_tools.py | |
parent | 134bcb0057007c4d821b911eb7b0df1797b054bd (diff) | |
download | numpy-7dad2d3596ff09ef7a7e33c3dfb593a0ba6321f6.tar.gz |
Fixing void scalar PyArray_Scalar constructor when *base==null.
During call to `PyArray_scalar` a `PyVoidScalarObject` is created, and
it's `obval` field set to a newly allocated block of memory of the
correct item size. With a null `base` member, the subsequent call to
`copyswap` can not determine an item size and returns without copying.
Adding direct copy of input data if no `base` is provided, as no swap is
required.
Adding regression test for constructor and original pickle repro case.
Resolves numpy/numpy#1550.
Diffstat (limited to 'numpy/_import_tools.py')
0 files changed, 0 insertions, 0 deletions