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

Method test_right_basic

numpy/lib/tests/test_function_base.py:1913–1919  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1911 assert_(np.all(digitize(x, bin) != 0))
1912
1913 def test_right_basic(self):
1914 x = [1, 5, 4, 10, 8, 11, 0]
1915 bins = [1, 5, 10]
1916 default_answer = [1, 2, 1, 3, 2, 3, 0]
1917 assert_array_equal(digitize(x, bins), default_answer)
1918 right_answer = [0, 1, 1, 2, 2, 3, 0]
1919 assert_array_equal(digitize(x, bins, True), right_answer)
1920
1921 def test_right_open(self):
1922 x = np.arange(-6, 5)

Callers

nothing calls this directly

Calls 2

assert_array_equalFunction · 0.90
digitizeFunction · 0.90

Tested by

no test coverage detected