summaryrefslogtreecommitdiff
path: root/numpy/core/fromnumeric.py
diff options
context:
space:
mode:
authorBas van Beek <43369155+BvB93@users.noreply.github.com>2021-10-03 02:21:11 +0200
committerGitHub <noreply@github.com>2021-10-02 19:21:11 -0500
commit96d5993c4fca186f8c9f0f686c963549a03d0636 (patch)
tree61ee86016f5691b3fc42b1617cd4b856afdf6ac3 /numpy/core/fromnumeric.py
parent6ad932c41281a6b7e525aba8a1057c09065251fa (diff)
downloadnumpy-96d5993c4fca186f8c9f0f686c963549a03d0636.tar.gz
BUG,DEP: Allow (arg-)partition to accept `uint64` indices (#20000)
* BUG: Allow (arg-)partition to accept `uint64` indices * DEP: Deprecate the use of booleans as (arg-)partition indices * TST,DEP: Add tests for the `parametrize` bool-index-deprecation * TST: Add more dtype-based tests for (arg-)partition * DOC: Add a release note for the (arg-)partition boolean deprecation * DEP: Explicitly mention numpy 1.22 in the (arg-)partition deprecation warning Co-Authored-By: Sebastian Berg <sebastian@sipsolutions.net> Co-authored-by: Sebastian Berg <sebastian@sipsolutions.net>
Diffstat (limited to 'numpy/core/fromnumeric.py')
-rw-r--r--numpy/core/fromnumeric.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/numpy/core/fromnumeric.py b/numpy/core/fromnumeric.py
index 5ecb1e666..29d215ea0 100644
--- a/numpy/core/fromnumeric.py
+++ b/numpy/core/fromnumeric.py
@@ -689,6 +689,9 @@ def partition(a, kth, axis=-1, kind='introselect', order=None):
it. The order of all elements in the partitions is undefined. If
provided with a sequence of k-th it will partition all elements
indexed by k-th of them into their sorted position at once.
+
+ .. deprecated:: 1.22.0
+ Passing booleans as index is deprecated.
axis : int or None, optional
Axis along which to sort. If None, the array is flattened before
sorting. The default is -1, which sorts along the last axis.
@@ -781,6 +784,9 @@ def argpartition(a, kth, axis=-1, kind='introselect', order=None):
elements in the partitions is undefined. If provided with a
sequence of k-th it will partition all of them into their sorted
position at once.
+
+ .. deprecated:: 1.22.0
+ Passing booleans as index is deprecated.
axis : int or None, optional
Axis along which to sort. The default is -1 (the last axis). If
None, the flattened array is used.