summaryrefslogtreecommitdiff
path: root/numpy/polynomial/polyutils.py
diff options
context:
space:
mode:
authorJulian Taylor <jtaylor.debian@googlemail.com>2014-07-18 21:31:44 +0200
committerJulian Taylor <jtaylor.debian@googlemail.com>2014-07-18 21:48:14 +0200
commitc09d0ce0e11c94a83413c1bc6c9b2f5f40008a5a (patch)
tree465ee903d43308c02e8968fa1bcb19a1c4e8faec /numpy/polynomial/polyutils.py
parent88cf0e4f6d722b12f2d57e3acb6452d6a015cc93 (diff)
downloadnumpy-c09d0ce0e11c94a83413c1bc6c9b2f5f40008a5a.tar.gz
BUG: initialize object array of array on resize and zeros
np.zeros(2, dtype=[('k', object, 2)]) did only initialize the first element to zero while the rest stayed None. In [1]: numpy.zeros(2, dtype=[('k', object, 2)]) Out[1]: array([([0, None],), ([0, None],)], dtype=[('k', 'O', (2,))]) This is a surprising and likely not intended behavior which is fixed here. The changed function PyArray_FillObjectArray is only used with None or zero inputs from numpy, though as its part of the API it could affect third parties but this is not very likely. Additionally the memory after the first element was not initialized when the object was resized. Closes gh-4857
Diffstat (limited to 'numpy/polynomial/polyutils.py')
0 files changed, 0 insertions, 0 deletions