summaryrefslogtreecommitdiff
path: root/numpy/lib/utils.py
diff options
context:
space:
mode:
authorSebastian Berg <sebastian@sipsolutions.net>2014-02-22 23:13:51 +0100
committerSebastian Berg <sebastian@sipsolutions.net>2015-06-06 13:56:49 +0200
commitc5ad05813f36bbb65248d85bf1bacb2d0d60c368 (patch)
treedf9b376dad885a8479ce4b5db35d24fddda780f5 /numpy/lib/utils.py
parent943ac81b58c7c8afbfadedbdd28ab94e56ad58fa (diff)
downloadnumpy-c5ad05813f36bbb65248d85bf1bacb2d0d60c368.tar.gz
DEP: Deprecate boolean array indices with non-matching shape
Boolean array indices will (unless the special case is taken) always be converted using a nonzero logic. However, for example ``` arr = np.arange(10) index = np.array([True]) arr[index] ``` would thus work as if index is filled up with `False`. This is a source of confusion and hardly useful in practice. Especially if the array has more then one dimension this behaviour can be very unexpected as it conflicts with broadcasting. Uses VisibleDeprecationWarning, since this is probably usually a user bug in the first place.
Diffstat (limited to 'numpy/lib/utils.py')
0 files changed, 0 insertions, 0 deletions