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

Method test_simple_inplace_02

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

Source from the content-addressed store, hash-verified

2048 assert_array_strict_equal(a, ac)
2049
2050 def test_simple_inplace_02(self):
2051 # Test native double input with scalar min/max in-place.
2052 a = self._generate_data(self.nr, self.nc)
2053 ac = a.copy()
2054 m = -0.5
2055 M = 0.6
2056 self.fastclip(a, m, M, a)
2057 self.clip(ac, m, M, ac)
2058 assert_array_strict_equal(a, ac)
2059
2060 def test_noncontig_inplace(self):
2061 # Test non contiguous double input with double scalar 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