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

Method test_noncontig_inplace

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

Source from the content-addressed store, hash-verified

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.
2062 a = self._generate_data(self.nr * 2, self.nc * 3)
2063 a = a[::2, ::3]
2064 assert_(not a.flags['F_CONTIGUOUS'])
2065 assert_(not a.flags['C_CONTIGUOUS'])
2066 ac = a.copy()
2067 m = -0.5
2068 M = 0.6
2069 self.fastclip(a, m, M, a)
2070 self.clip(ac, m, M, ac)
2071 assert_array_equal(a, ac)
2072
2073 def test_type_cast_01(self):
2074 # Test native double input with scalar min/max.

Callers

nothing calls this directly

Calls 6

_generate_dataMethod · 0.95
fastclipMethod · 0.95
clipMethod · 0.95
assert_Function · 0.90
assert_array_equalFunction · 0.90
copyMethod · 0.45

Tested by

no test coverage detected