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

Method test_simple_int32_out

numpy/_core/tests/test_numeric.py:2518–2527  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2516 assert_array_strict_equal(ac, act)
2517
2518 def test_simple_int32_out(self):
2519 # Test native double input with scalar min/max and int out.
2520 a = self._generate_data(self.nr, self.nc)
2521 m = -1.0
2522 M = 2.0
2523 ac = np.zeros(a.shape, dtype=np.int32)
2524 act = ac.copy()
2525 self.fastclip(a, m, M, out=ac, casting="unsafe")
2526 self.clip(a, m, M, act)
2527 assert_array_strict_equal(ac, act)
2528
2529 def test_simple_inplace_01(self):
2530 # 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