summaryrefslogtreecommitdiff
path: root/numpy/polynomial/polyutils.py
diff options
context:
space:
mode:
authorgfyoung <gfyoung@mit.edu>2016-01-18 20:29:34 +0000
committergfyoung <gfyoung@mit.edu>2016-01-24 03:20:20 +0000
commit61f872265b67b313058a07533eaed88f4170ff2c (patch)
tree176f5c2f8fd052e0dc5853427390feb43dbe91e4 /numpy/polynomial/polyutils.py
parent9849922aa4ace91906878df51053a32e2719a722 (diff)
downloadnumpy-61f872265b67b313058a07533eaed88f4170ff2c.tar.gz
BUG: One element array inputs get one element arrays returned in np.random
Fixes bug in np.random methods that would return scalars when passed one-element array inputs. This is because one-element ndarrays can be cast to integers / floats, which is what functions like PyFloat_AsDouble do before converting to the intended data type. This commit changes the check used to determine whether the inputs are purely scalar by converting all inputs to arrays and checking if the resulting shape is an empty tuple (scalar) or not (array). Closes gh-4263.
Diffstat (limited to 'numpy/polynomial/polyutils.py')
0 files changed, 0 insertions, 0 deletions