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/lib/tests | |
parent | 983bbb5ed2495e034b437a0b58a69371d4dfed74 (diff) | |
download | numpy-09992482c93f1b9e28b7958a792e6b3b709834fa.tar.gz |
Use set litterals
Diffstat (limited to 'numpy/lib/tests')
-rw-r--r-- | numpy/lib/tests/test__iotools.py | 2 | ||||
-rw-r--r-- | numpy/lib/tests/test_shape_base.py | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/numpy/lib/tests/test__iotools.py b/numpy/lib/tests/test__iotools.py index b4888f1bd..2d090709a 100644 --- a/numpy/lib/tests/test__iotools.py +++ b/numpy/lib/tests/test__iotools.py @@ -246,7 +246,7 @@ class TestStringConverter(object): converter = StringConverter(int, default=0, missing_values="N/A") assert_equal( - converter.missing_values, set(['', 'N/A'])) + converter.missing_values, {'', 'N/A'}) def test_int64_dtype(self): "Check that int64 integer types can be specified" diff --git a/numpy/lib/tests/test_shape_base.py b/numpy/lib/tests/test_shape_base.py index e338467f9..01ea028bb 100644 --- a/numpy/lib/tests/test_shape_base.py +++ b/numpy/lib/tests/test_shape_base.py @@ -260,8 +260,8 @@ class TestApplyAlongAxis(object): def test_with_iterable_object(self): # from issue 5248 d = np.array([ - [set([1, 11]), set([2, 22]), set([3, 33])], - [set([4, 44]), set([5, 55]), set([6, 66])] + [{1, 11}, {2, 22}, {3, 33}], + [{4, 44}, {5, 55}, {6, 66}] ]) actual = np.apply_along_axis(lambda a: set.union(*a), 0, d) expected = np.array([{1, 11, 4, 44}, {2, 22, 5, 55}, {3, 33, 6, 66}]) |