diff options
author | Sebastian Berg <sebastian@sipsolutions.net> | 2015-12-02 21:08:24 +0100 |
---|---|---|
committer | Sebastian Berg <sebastian@sipsolutions.net> | 2015-12-02 21:10:44 +0100 |
commit | 927e8809cb566722b1bd0b15dca9f030f3cd29b9 (patch) | |
tree | 2d306e4bc11026697fe647047a8e8b717d28891c /numpy/core/fromnumeric.py | |
parent | 45ff55634c0ddd44bd07141b3ffb6c4c5f08118c (diff) | |
download | numpy-927e8809cb566722b1bd0b15dca9f030f3cd29b9.tar.gz |
BUG: resizing empty array with complex dtype failed
This is because the dtype was passed into the new array as a
char, and many dtypes do not have a valid char representation.
Closes gh-6740
Diffstat (limited to 'numpy/core/fromnumeric.py')
-rw-r--r-- | numpy/core/fromnumeric.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/core/fromnumeric.py b/numpy/core/fromnumeric.py index 0fc572cb6..197513294 100644 --- a/numpy/core/fromnumeric.py +++ b/numpy/core/fromnumeric.py @@ -1134,7 +1134,7 @@ def resize(a, new_shape): a = ravel(a) Na = len(a) if not Na: - return mu.zeros(new_shape, a.dtype.char) + return mu.zeros(new_shape, a.dtype) total_size = um.multiply.reduce(new_shape) n_copies = int(total_size / Na) extra = total_size % Na |