diff options
author | Bas van Beek <43369155+BvB93@users.noreply.github.com> | 2020-08-04 06:00:37 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-08-04 07:00:37 +0300 |
commit | 593ef5fc5a02fbcd6eeb70a59684b3b21c9cc643 (patch) | |
tree | e811d881547f6cab8998b887d9a7dfa4e5965641 /doc/release | |
parent | 8f6052280c445328c7f7436917c26fc295429173 (diff) | |
download | numpy-593ef5fc5a02fbcd6eeb70a59684b3b21c9cc643.tar.gz |
ENH: Speed up trim_zeros (#16911)
* Added a benchmark for `trim_zeros()`
* Improve the performance of `np.trim_zeros()`
* Increase the variety of the tests
Fall back to the old `np.trim_zeros()` implementation if an exception is encountered.
Emit a `DeprecationWarning` in such case.
* DEP,REL: Added a deprecation release note
Diffstat (limited to 'doc/release')
-rw-r--r-- | doc/release/upcoming_changes/16911.deprecation.rst | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/doc/release/upcoming_changes/16911.deprecation.rst b/doc/release/upcoming_changes/16911.deprecation.rst new file mode 100644 index 000000000..d4dcb629c --- /dev/null +++ b/doc/release/upcoming_changes/16911.deprecation.rst @@ -0,0 +1,7 @@ +``trim_zeros`` now requires a 1D array compatible with ``ndarray.astype(bool)`` +------------------------------------------------------------------------------- +The ``trim_zeros`` function will, in the future, require an array with the +following two properties: + +* It must be 1D. +* It must be convertable into a boolean array. |