summaryrefslogtreecommitdiff
path: root/numpy/lib/tests/test_arraypad.py
diff options
context:
space:
mode:
authorEric Wieser <wieser.eric@gmail.com>2018-05-29 09:34:22 -0700
committerGitHub <noreply@github.com>2018-05-29 09:34:22 -0700
commit2d0ee485f754062621eb20e0959baf0d4e119b64 (patch)
treeb3a3fefa936ebad1616f9db719d12b1279364899 /numpy/lib/tests/test_arraypad.py
parent80de28de294b24f926133a86176f64f6a13c5411 (diff)
parent6246cf19fdda3ccca4338dcec2f3956294e30ce7 (diff)
downloadnumpy-2d0ee485f754062621eb20e0959baf0d4e119b64.tar.gz
Merge branch 'master' into npzfile-mappin
Diffstat (limited to 'numpy/lib/tests/test_arraypad.py')
-rw-r--r--numpy/lib/tests/test_arraypad.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/numpy/lib/tests/test_arraypad.py b/numpy/lib/tests/test_arraypad.py
index 8be49ce67..8ba0370b0 100644
--- a/numpy/lib/tests/test_arraypad.py
+++ b/numpy/lib/tests/test_arraypad.py
@@ -489,6 +489,19 @@ class TestConstant(object):
)
assert_allclose(test, expected)
+ def test_check_large_integers(self):
+ uint64_max = 2 ** 64 - 1
+ arr = np.full(5, uint64_max, dtype=np.uint64)
+ test = np.pad(arr, 1, mode="constant", constant_values=arr.min())
+ expected = np.full(7, uint64_max, dtype=np.uint64)
+ assert_array_equal(test, expected)
+
+ int64_max = 2 ** 63 - 1
+ arr = np.full(5, int64_max, dtype=np.int64)
+ test = np.pad(arr, 1, mode="constant", constant_values=arr.min())
+ expected = np.full(7, int64_max, dtype=np.int64)
+ assert_array_equal(test, expected)
+
class TestLinearRamp(object):
def test_check_simple(self):