diff options
author | MSeifert04 <michaelseifert04@yahoo.de> | 2019-07-01 21:19:51 +0200 |
---|---|---|
committer | MSeifert04 <michaelseifert04@yahoo.de> | 2019-07-01 21:19:51 +0200 |
commit | 94d6a3759d5b56b7c1c2ba4c327f891aedde2ebc (patch) | |
tree | 211f636ca7f6f653c775de14e3b25d96b352a89f /numpy/core | |
parent | a14a8cefdeb80552f0feecd65c8c5b6b869aa487 (diff) | |
download | numpy-94d6a3759d5b56b7c1c2ba4c327f891aedde2ebc.tar.gz |
MAINT: Replace integers in places where booleans are expected
Diffstat (limited to 'numpy/core')
-rw-r--r-- | numpy/core/arrayprint.py | 4 | ||||
-rw-r--r-- | numpy/core/records.py | 2 | ||||
-rw-r--r-- | numpy/core/tests/test_function_base.py | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/numpy/core/arrayprint.py b/numpy/core/arrayprint.py index 3e8cdf6ab..739ae7711 100644 --- a/numpy/core/arrayprint.py +++ b/numpy/core/arrayprint.py @@ -1641,5 +1641,5 @@ def set_string_function(f, repr=True): else: return multiarray.set_string_function(f, repr) -set_string_function(_default_array_str, 0) -set_string_function(_default_array_repr, 1) +set_string_function(_default_array_str, False) +set_string_function(_default_array_repr, True) diff --git a/numpy/core/records.py b/numpy/core/records.py index 659ffa42b..0576005e7 100644 --- a/numpy/core/records.py +++ b/numpy/core/records.py @@ -163,7 +163,7 @@ class format_parser(object): self._createdescr(byteorder) self.dtype = self._descr - def _parseFormats(self, formats, aligned=0): + def _parseFormats(self, formats, aligned=False): """ Parse the field formats """ if formats is None: diff --git a/numpy/core/tests/test_function_base.py b/numpy/core/tests/test_function_base.py index 8b820bd75..6f5709372 100644 --- a/numpy/core/tests/test_function_base.py +++ b/numpy/core/tests/test_function_base.py @@ -49,7 +49,7 @@ class TestLogspace(object): assert_(len(y) == 50) y = logspace(0, 6, num=100) assert_(y[-1] == 10 ** 6) - y = logspace(0, 6, endpoint=0) + y = logspace(0, 6, endpoint=False) assert_(y[-1] < 10 ** 6) y = logspace(0, 6, num=7) assert_array_equal(y, [1, 10, 100, 1e3, 1e4, 1e5, 1e6]) @@ -229,7 +229,7 @@ class TestLinspace(object): assert_(len(y) == 50) y = linspace(2, 10, num=100) assert_(y[-1] == 10) - y = linspace(2, 10, endpoint=0) + y = linspace(2, 10, endpoint=False) assert_(y[-1] < 10) assert_raises(ValueError, linspace, 0, 10, num=-1) |