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

Method test_no_p_overwrite

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

Source from the content-addressed store, hash-verified

4049 assert_raises(TypeError, np.quantile, arr_c, 0.5)
4050
4051 def test_no_p_overwrite(self):
4052 # this is worth retesting, because quantile does not make a copy
4053 p0 = np.array([0, 0.75, 0.25, 0.5, 1.0])
4054 p = p0.copy()
4055 np.quantile(np.arange(100.), p, method="midpoint")
4056 assert_array_equal(p, p0)
4057
4058 p0 = p0.tolist()
4059 p = p.tolist()
4060 np.quantile(np.arange(100.), p, method="midpoint")
4061 assert_array_equal(p, p0)
4062
4063 @pytest.mark.parametrize("dtype", np.typecodes["AllInteger"])
4064 def test_quantile_preserve_int_type(self, dtype):

Callers

nothing calls this directly

Calls 3

assert_array_equalFunction · 0.90
copyMethod · 0.45
tolistMethod · 0.45

Tested by

no test coverage detected