diff options
author | Roman Yurchak <rth.yurchak@pm.me> | 2018-11-24 20:59:42 +0100 |
---|---|---|
committer | Roman Yurchak <rth.yurchak@pm.me> | 2018-11-24 20:59:42 +0100 |
commit | 09992482c93f1b9e28b7958a792e6b3b709834fa (patch) | |
tree | b807248742d02c48403d77b076f53b71f22df707 /numpy/core/numeric.py | |
parent | 983bbb5ed2495e034b437a0b58a69371d4dfed74 (diff) | |
download | numpy-09992482c93f1b9e28b7958a792e6b3b709834fa.tar.gz |
Use set litterals
Diffstat (limited to 'numpy/core/numeric.py')
-rw-r--r-- | numpy/core/numeric.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/core/numeric.py b/numpy/core/numeric.py index aa5be1af3..85f45c795 100644 --- a/numpy/core/numeric.py +++ b/numpy/core/numeric.py @@ -745,7 +745,7 @@ def require(a, dtype=None, requirements=None): if not requirements: return asanyarray(a, dtype=dtype) else: - requirements = set(possible_flags[x.upper()] for x in requirements) + requirements = {possible_flags[x.upper()] for x in requirements} if 'E' in requirements: requirements.remove('E') @@ -754,7 +754,7 @@ def require(a, dtype=None, requirements=None): subok = True order = 'A' - if requirements >= set(['C', 'F']): + if requirements >= {'C', 'F'}: raise ValueError('Cannot specify both "C" and "F" order') elif 'F' in requirements: order = 'F' |