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

Method test_simple_int32_out

numpy/core/tests/test_numeric.py:2029–2038  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2027 assert_array_strict_equal(ac, act)
2028
2029 def test_simple_int32_out(self):
2030 # Test native double input with scalar min/max and int out.
2031 a = self._generate_data(self.nr, self.nc)
2032 m = -1.0
2033 M = 2.0
2034 ac = np.zeros(a.shape, dtype=np.int32)
2035 act = ac.copy()
2036 self.fastclip(a, m, M, out=ac, casting="unsafe")
2037 self.clip(a, m, M, act)
2038 assert_array_strict_equal(ac, act)
2039
2040 def test_simple_inplace_01(self):
2041 # Test native double input with array min/max in-place.

Callers

nothing calls this directly

Calls 5

_generate_dataMethod · 0.95
fastclipMethod · 0.95
clipMethod · 0.95
copyMethod · 0.45

Tested by

no test coverage detected