diff options
author | Sebastian Berg <sebastian@sipsolutions.net> | 2014-02-22 23:13:51 +0100 |
---|---|---|
committer | Sebastian Berg <sebastian@sipsolutions.net> | 2015-06-06 13:56:49 +0200 |
commit | c5ad05813f36bbb65248d85bf1bacb2d0d60c368 (patch) | |
tree | df9b376dad885a8479ce4b5db35d24fddda780f5 /numpy/core/defchararray.py | |
parent | 943ac81b58c7c8afbfadedbdd28ab94e56ad58fa (diff) | |
download | numpy-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/core/defchararray.py')
0 files changed, 0 insertions, 0 deletions