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

Method test_simple_int64_inout

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

Source from the content-addressed store, hash-verified

2016 assert_array_strict_equal(ac, act)
2017
2018 def test_simple_int64_inout(self):
2019 # Test native int32 input with double array min/max and int32 out.
2020 a = self._generate_int32_data(self.nr, self.nc)
2021 m = np.zeros(a.shape, np.float64)
2022 M = np.float64(1)
2023 ac = np.zeros(a.shape, dtype=np.int32)
2024 act = ac.copy()
2025 self.fastclip(a, m, M, out=ac, casting="unsafe")
2026 self.clip(a, m, M, act)
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.

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