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

Method test_simple_inplace_02

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

Source from the content-addressed store, hash-verified

2537 assert_array_strict_equal(a, ac)
2538
2539 def test_simple_inplace_02(self):
2540 # Test native double input with scalar min/max in-place.
2541 a = self._generate_data(self.nr, self.nc)
2542 ac = a.copy()
2543 m = -0.5
2544 M = 0.6
2545 self.fastclip(a, m, M, a)
2546 self.clip(ac, m, M, ac)
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.

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