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

Method test_clip_non_contig

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

Source from the content-addressed store, hash-verified

1967 assert_array_strict_equal(aM, a)
1968
1969 def test_clip_non_contig(self):
1970 # Test clip for non contiguous native input and native scalar min/max.
1971 a = self._generate_data(self.nr * 2, self.nc * 3)
1972 a = a[::2, ::3]
1973 assert_(not a.flags['F_CONTIGUOUS'])
1974 assert_(not a.flags['C_CONTIGUOUS'])
1975 ac = self.fastclip(a, -1.6, 1.7)
1976 act = self.clip(a, -1.6, 1.7)
1977 assert_array_strict_equal(ac, act)
1978
1979 def test_simple_out(self):
1980 # 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