MCPcopy Index your code
hub / github.com/numpy/numpy / test_clip_complex

Method test_clip_complex

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

Source from the content-addressed store, hash-verified

2444 assert_array_strict_equal(ac, act)
2445
2446 def test_clip_complex(self):
2447 # Address Issue gh-5354 for clipping complex arrays
2448 # Test native complex input without explicit min/max
2449 # ie, either min=None or max=None
2450 a = np.ones(10, dtype=complex)
2451 m = a.min()
2452 M = a.max()
2453 am = self.fastclip(a, m, None)
2454 aM = self.fastclip(a, None, M)
2455 assert_array_strict_equal(am, a)
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.

Callers

nothing calls this directly

Calls 4

fastclipMethod · 0.95
minMethod · 0.45
maxMethod · 0.45

Tested by

no test coverage detected