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

Method test_noncontig_inplace

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

Source from the content-addressed store, hash-verified

2547 assert_array_strict_equal(a, ac)
2548
2549 def test_noncontig_inplace(self):
2550 # Test non contiguous double input with double scalar min/max in-place.
2551 a = self._generate_data(self.nr * 2, self.nc * 3)
2552 a = a[::2, ::3]
2553 assert_(not a.flags['F_CONTIGUOUS'])
2554 assert_(not a.flags['C_CONTIGUOUS'])
2555 ac = a.copy()
2556 m = -0.5
2557 M = 0.6
2558 self.fastclip(a, m, M, a)
2559 self.clip(ac, m, M, ac)
2560 assert_array_equal(a, ac)
2561
2562 def test_type_cast_01(self):
2563 # 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