summaryrefslogtreecommitdiff
path: root/numpy/lib/arraysetops.py
diff options
context:
space:
mode:
authorStephan Hoyer <shoyer@gmail.com>2018-10-26 08:27:54 -0700
committerGitHub <noreply@github.com>2018-10-26 08:27:54 -0700
commitfbc3ad69d2396fc5edbb2f145c82965756185f82 (patch)
treecccb607a97f06146613946983fc2aa7bf0ddfabf /numpy/lib/arraysetops.py
parent1b8996e9477f38c8ced522c85df9ab9d73fcd339 (diff)
parent3debe9772ea1b68d997dba3440929a467ad11c52 (diff)
downloadnumpy-fbc3ad69d2396fc5edbb2f145c82965756185f82.tar.gz
Merge branch 'master' into fix-overloaded-repr
Diffstat (limited to 'numpy/lib/arraysetops.py')
-rw-r--r--numpy/lib/arraysetops.py14
1 files changed, 11 insertions, 3 deletions
diff --git a/numpy/lib/arraysetops.py b/numpy/lib/arraysetops.py
index 2f8c07114..850e20123 100644
--- a/numpy/lib/arraysetops.py
+++ b/numpy/lib/arraysetops.py
@@ -27,8 +27,14 @@ To do: Optionally return indices analogously to unique for all functions.
"""
from __future__ import division, absolute_import, print_function
+import functools
+
import numpy as np
-from numpy.core.overrides import array_function_dispatch
+from numpy.core import overrides
+
+
+array_function_dispatch = functools.partial(
+ overrides.array_function_dispatch, module='numpy')
__all__ = [
@@ -738,7 +744,7 @@ def setdiff1d(ar1, ar2, assume_unique=False):
"""
Find the set difference of two arrays.
- Return the sorted, unique values in `ar1` that are not in `ar2`.
+ Return the unique values in `ar1` that are not in `ar2`.
Parameters
----------
@@ -753,7 +759,9 @@ def setdiff1d(ar1, ar2, assume_unique=False):
Returns
-------
setdiff1d : ndarray
- Sorted 1D array of values in `ar1` that are not in `ar2`.
+ 1D array of values in `ar1` that are not in `ar2`. The result
+ is sorted when `assume_unique=False`, but otherwise only sorted
+ if the input is sorted.
See Also
--------