diff options
Diffstat (limited to 'numpy/lib')
-rw-r--r-- | numpy/lib/arraysetops.py | 12 | ||||
-rw-r--r-- | numpy/lib/function_base.py | 2 | ||||
-rw-r--r-- | numpy/lib/type_check.py | 4 | ||||
-rw-r--r-- | numpy/lib/ufunclike.py | 4 |
4 files changed, 11 insertions, 11 deletions
diff --git a/numpy/lib/arraysetops.py b/numpy/lib/arraysetops.py index ededb9dd0..59b54eb38 100644 --- a/numpy/lib/arraysetops.py +++ b/numpy/lib/arraysetops.py @@ -435,12 +435,12 @@ def in1d(ar1, ar2, assume_unique=False, invert=False): >>> states = [0, 2] >>> mask = np.in1d(test, states) >>> mask - array([ True, False, True, False, True], dtype=bool) + array([ True, False, True, False, True]) >>> test[mask] array([0, 2, 0]) >>> mask = np.in1d(test, states, invert=True) >>> mask - array([False, True, False, True, False], dtype=bool) + array([False, True, False, True, False]) >>> test[mask] array([1, 5]) """ @@ -546,13 +546,13 @@ def isin(element, test_elements, assume_unique=False, invert=False): >>> mask = np.isin(element, test_elements) >>> mask array([[ False, True], - [ True, False]], dtype=bool) + [ True, False]]) >>> element[mask] array([2, 4]) >>> mask = np.isin(element, test_elements, invert=True) >>> mask array([[ True, False], - [ False, True]], dtype=bool) + [ False, True]]) >>> element[mask] array([0, 6]) @@ -562,13 +562,13 @@ def isin(element, test_elements, assume_unique=False, invert=False): >>> test_set = {1, 2, 4, 8} >>> np.isin(element, test_set) array([[ False, False], - [ False, False]], dtype=bool) + [ False, False]]) Casting the set to a list gives the expected result: >>> np.isin(element, list(test_set)) array([[ False, True], - [ True, False]], dtype=bool) + [ True, False]]) """ element = np.asarray(element) return in1d(element, test_elements, assume_unique=assume_unique, diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py index 498853d32..c9a23350d 100644 --- a/numpy/lib/function_base.py +++ b/numpy/lib/function_base.py @@ -2333,7 +2333,7 @@ def extract(condition, arr): >>> condition array([[ True, False, False, True], [False, False, True, False], - [False, True, False, False]], dtype=bool) + [False, True, False, False]]) >>> np.extract(condition, arr) array([0, 3, 6, 9]) diff --git a/numpy/lib/type_check.py b/numpy/lib/type_check.py index e6aae8ddd..5c7528d4f 100644 --- a/numpy/lib/type_check.py +++ b/numpy/lib/type_check.py @@ -208,7 +208,7 @@ def iscomplex(x): Examples -------- >>> np.iscomplex([1+1j, 1+0j, 4.5, 3, 2, 2j]) - array([ True, False, False, False, False, True], dtype=bool) + array([ True, False, False, False, False, True]) """ ax = asanyarray(x) @@ -242,7 +242,7 @@ def isreal(x): Examples -------- >>> np.isreal([1+1j, 1+0j, 4.5, 3, 2, 2j]) - array([False, True, True, True, True, False], dtype=bool) + array([False, True, True, True, True, False]) """ return imag(x) == 0 diff --git a/numpy/lib/ufunclike.py b/numpy/lib/ufunclike.py index ad7c85e59..e0bd95182 100644 --- a/numpy/lib/ufunclike.py +++ b/numpy/lib/ufunclike.py @@ -128,7 +128,7 @@ def isposinf(x, out=None): >>> np.isposinf(np.NINF) array(False, dtype=bool) >>> np.isposinf([-np.inf, 0., np.inf]) - array([False, False, True], dtype=bool) + array([False, False, True]) >>> x = np.array([-np.inf, 0., np.inf]) >>> y = np.array([2, 2, 2]) @@ -189,7 +189,7 @@ def isneginf(x, out=None): >>> np.isneginf(np.PINF) array(False, dtype=bool) >>> np.isneginf([-np.inf, 0., np.inf]) - array([ True, False, False], dtype=bool) + array([ True, False, False]) >>> x = np.array([-np.inf, 0., np.inf]) >>> y = np.array([2, 2, 2]) |