summaryrefslogtreecommitdiff
path: root/numpy/polynomial/polyutils.py
diff options
context:
space:
mode:
authorThomas A Caswell <tcaswell@bnl.gov>2014-04-14 08:43:20 -0400
committerThomas A Caswell <tcaswell@gmail.com>2016-02-07 14:26:55 -0500
commit75ae820c74e927679af82ef634a8f3ef0f97503f (patch)
treeb2b5df40c39feded29b9213ae6fdf77a654a121e /numpy/polynomial/polyutils.py
parent35b5f5be1ffffada84c8be207e7b8b196a58f786 (diff)
downloadnumpy-75ae820c74e927679af82ef634a8f3ef0f97503f.tar.gz
BUG: many functions silently drop `keepdims` kwarg
change test from `type(a) is not mu.ndarray` to `not isinstance(a, mu.ndarray)` Because every sub-class of ndarray is not guaranteed to implement `keepdims` as a kwarg, when wrapping these methods care must be taken. The previous behavior was to silently eat the kwarg when dealing with a sub-class of ndarray. Now, if `keepdims=np._NoValue` (the new default) it is not passed through to the underlying function call (so the default value of `keepdims` is now controlled by the sub-class). If `keepdims` is not `np._NoValue` then it is passed through and will raise an exception if the sub-class does not support the kwarg. A special case in nanvar was required to deal with `matrix` that previously relied on `fromnumeric` silently dropping `keepdims`.
Diffstat (limited to 'numpy/polynomial/polyutils.py')
0 files changed, 0 insertions, 0 deletions