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

Method test_simple_complex

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

Source from the content-addressed store, hash-verified

2426 assert_array_equal(ac, act)
2427
2428 def test_simple_complex(self):
2429 # Test native complex input with native double scalar min/max.
2430 # Test native input with complex double scalar min/max.
2431 a = 3 * self._generate_data_complex(self.nr, self.nc)
2432 m = -0.5
2433 M = 1.
2434 ac = self.fastclip(a, m, M)
2435 act = self.clip(a, m, M)
2436 assert_array_strict_equal(ac, act)
2437
2438 # Test native input with complex double scalar min/max.
2439 a = 3 * self._generate_data(self.nr, self.nc)
2440 m = -0.5 + 1.j
2441 M = 1. + 2.j
2442 ac = self.fastclip(a, m, M)
2443 act = self.clip(a, m, M)
2444 assert_array_strict_equal(ac, act)
2445
2446 def test_clip_complex(self):
2447 # Address Issue gh-5354 for clipping complex arrays

Callers

nothing calls this directly

Calls 5

fastclipMethod · 0.95
clipMethod · 0.95
_generate_dataMethod · 0.95

Tested by

no test coverage detected