diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2018-11-15 13:06:21 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-15 13:06:21 -0600 |
commit | a631f5b3841d2a87af290c203be26a06eb280638 (patch) | |
tree | 8d1e56f7a662a134b1dd21c4663bc1df13bee4bd /numpy/lib/function_base.py | |
parent | ff8b0b21e0f17dbcc94fc87ba1194dcbbbe15432 (diff) | |
parent | e85233f414ba7c7a20ec7c61e3733f666a0046fd (diff) | |
download | numpy-a631f5b3841d2a87af290c203be26a06eb280638.tar.gz |
Merge pull request #12391 from mattip/deprecate-unique
DEP: raise on a call to deprecated numpy.lib.function_base.unique
Diffstat (limited to 'numpy/lib/function_base.py')
-rw-r--r-- | numpy/lib/function_base.py | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py index 07bdb92ba..5f87c8b2c 100644 --- a/numpy/lib/function_base.py +++ b/numpy/lib/function_base.py @@ -1621,25 +1621,6 @@ def trim_zeros(filt, trim='fb'): last = last - 1 return filt[first:last] - -@deprecate -def unique(x): - """ - This function is deprecated. Use numpy.lib.arraysetops.unique() - instead. - """ - try: - tmp = x.flatten() - if tmp.size == 0: - return tmp - tmp.sort() - idx = concatenate(([True], tmp[1:] != tmp[:-1])) - return tmp[idx] - except AttributeError: - items = sorted(set(x)) - return asarray(items) - - def _extract_dispatcher(condition, arr): return (condition, arr) |