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

Method test_simple_int64_inout

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

Source from the content-addressed store, hash-verified

2505 assert_array_strict_equal(ac, act)
2506
2507 def test_simple_int64_inout(self):
2508 # Test native int32 input with double array min/max and int32 out.
2509 a = self._generate_int32_data(self.nr, self.nc)
2510 m = np.zeros(a.shape, np.float64)
2511 M = np.float64(1)
2512 ac = np.zeros(a.shape, dtype=np.int32)
2513 act = ac.copy()
2514 self.fastclip(a, m, M, out=ac, casting="unsafe")
2515 self.clip(a, m, M, act)
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.

Callers

nothing calls this directly

Calls 5

_generate_int32_dataMethod · 0.95
fastclipMethod · 0.95
clipMethod · 0.95
copyMethod · 0.45

Tested by

no test coverage detected