summaryrefslogtreecommitdiff
path: root/numpy/lib
diff options
context:
space:
mode:
authorMiles Cranmer <miles.cranmer@gmail.com>2022-06-10 16:14:36 -0400
committerGitHub <noreply@github.com>2022-06-10 16:14:36 -0400
commit530ccde5297ee36bc8b142b4f2cc8486ba90a678 (patch)
tree5af528476e4aeb4fa311bb32b7af847a35ebee88 /numpy/lib
parent67ab480c5dc0ab4644befc9d0b43e81cf12ba8d4 (diff)
downloadnumpy-530ccde5297ee36bc8b142b4f2cc8486ba90a678.tar.gz
MAINT: Formatting changes for in1d
Co-authored-by: Hameer Abbasi <2190658+hameerabbasi@users.noreply.github.com>
Diffstat (limited to 'numpy/lib')
-rw-r--r--numpy/lib/arraysetops.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/lib/arraysetops.py b/numpy/lib/arraysetops.py
index 53a2b6e02..954e915b7 100644
--- a/numpy/lib/arraysetops.py
+++ b/numpy/lib/arraysetops.py
@@ -617,12 +617,12 @@ def in1d(ar1, ar2, assume_unique=False, invert=False, method='auto'):
integer_arrays = (np.issubdtype(ar1.dtype, np.integer) and
np.issubdtype(ar2.dtype, np.integer))
- if method not in ['auto', 'sort', 'dictionary']:
+ if method not in {'auto', 'sort', 'dictionary'}:
raise ValueError(
"Invalid method: {0}. ".format(method)
+ "Please use 'auto', 'sort' or 'dictionary'.")
- if integer_arrays and method in ['auto', 'dictionary']:
+ if integer_arrays and method in {'auto', 'dictionary'}:
ar2_min = np.min(ar2)
ar2_max = np.max(ar2)
ar2_size = ar2.size