diff options
author | Miles Cranmer <miles.cranmer@gmail.com> | 2022-06-10 16:14:36 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-10 16:14:36 -0400 |
commit | 530ccde5297ee36bc8b142b4f2cc8486ba90a678 (patch) | |
tree | 5af528476e4aeb4fa311bb32b7af847a35ebee88 /numpy/lib | |
parent | 67ab480c5dc0ab4644befc9d0b43e81cf12ba8d4 (diff) | |
download | numpy-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.py | 4 |
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 |