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

Method test_clip_non_contig

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

Source from the content-addressed store, hash-verified

2456 assert_array_strict_equal(aM, a)
2457
2458 def test_clip_non_contig(self):
2459 # Test clip for non contiguous native input and native scalar min/max.
2460 a = self._generate_data(self.nr * 2, self.nc * 3)
2461 a = a[::2, ::3]
2462 assert_(not a.flags['F_CONTIGUOUS'])
2463 assert_(not a.flags['C_CONTIGUOUS'])
2464 ac = self.fastclip(a, -1.6, 1.7)
2465 act = self.clip(a, -1.6, 1.7)
2466 assert_array_strict_equal(ac, act)
2467
2468 def test_simple_out(self):
2469 # Test native double input with scalar min/max.

Callers

nothing calls this directly

Calls 5

_generate_dataMethod · 0.95
fastclipMethod · 0.95
clipMethod · 0.95
assert_Function · 0.90

Tested by

no test coverage detected