MCPcopy Index your code
hub / github.com/numpy/numpy / test_right_basic

Method test_right_basic

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

Source from the content-addressed store, hash-verified

2168 assert_(np.all(digitize(x, bin) != 0))
2169
2170 def test_right_basic(self):
2171 x = [1, 5, 4, 10, 8, 11, 0]
2172 bins = [1, 5, 10]
2173 default_answer = [1, 2, 1, 3, 2, 3, 0]
2174 assert_array_equal(digitize(x, bins), default_answer)
2175 right_answer = [0, 1, 1, 2, 2, 3, 0]
2176 assert_array_equal(digitize(x, bins, True), right_answer)
2177
2178 def test_right_open(self):
2179 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