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

Method test_simple_complex

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

Source from the content-addressed store, hash-verified

1937 assert_array_equal(ac, act)
1938
1939 def test_simple_complex(self):
1940 # Test native complex input with native double scalar min/max.
1941 # Test native input with complex double scalar min/max.
1942 a = 3 * self._generate_data_complex(self.nr, self.nc)
1943 m = -0.5
1944 M = 1.
1945 ac = self.fastclip(a, m, M)
1946 act = self.clip(a, m, M)
1947 assert_array_strict_equal(ac, act)
1948
1949 # Test native input with complex double scalar min/max.
1950 a = 3 * self._generate_data(self.nr, self.nc)
1951 m = -0.5 + 1.j
1952 M = 1. + 2.j
1953 ac = self.fastclip(a, m, M)
1954 act = self.clip(a, m, M)
1955 assert_array_strict_equal(ac, act)
1956
1957 def test_clip_complex(self):
1958 # 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