MCPcopy Create free account
hub / github.com/numpy/numpy / test_check_large_integers

Method test_check_large_integers

numpy/lib/tests/test_arraypad.py:642–653  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

640 assert_allclose(test, expected)
641
642 def test_check_large_integers(self):
643 uint64_max = 2 ** 64 - 1
644 arr = np.full(5, uint64_max, dtype=np.uint64)
645 test = np.pad(arr, 1, mode="constant", constant_values=arr.min())
646 expected = np.full(7, uint64_max, dtype=np.uint64)
647 assert_array_equal(test, expected)
648
649 int64_max = 2 ** 63 - 1
650 arr = np.full(5, int64_max, dtype=np.int64)
651 test = np.pad(arr, 1, mode="constant", constant_values=arr.min())
652 expected = np.full(7, int64_max, dtype=np.int64)
653 assert_array_equal(test, expected)
654
655 def test_check_object_array(self):
656 arr = np.empty(1, dtype=object)

Callers

nothing calls this directly

Calls 2

assert_array_equalFunction · 0.90
minMethod · 0.45

Tested by

no test coverage detected