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

Method test_simple_nonnative

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

Source from the content-addressed store, hash-verified

1918 assert_array_strict_equal(ac, act)
1919
1920 def test_simple_nonnative(self):
1921 # Test non native double input with scalar min/max.
1922 # Test native double input with non native double scalar min/max.
1923 a = self._generate_non_native_data(self.nr, self.nc)
1924 m = -0.5
1925 M = 0.6
1926 ac = self.fastclip(a, m, M)
1927 act = self.clip(a, m, M)
1928 assert_array_equal(ac, act)
1929
1930 # Test native double input with non native double scalar min/max.
1931 a = self._generate_data(self.nr, self.nc)
1932 m = -0.5
1933 M = self._neg_byteorder(0.6)
1934 assert_(not M.dtype.isnative)
1935 ac = self.fastclip(a, m, M)
1936 act = self.clip(a, m, M)
1937 assert_array_equal(ac, act)
1938
1939 def test_simple_complex(self):
1940 # Test native complex input with native double scalar min/max.

Callers

nothing calls this directly

Calls 7

fastclipMethod · 0.95
clipMethod · 0.95
_generate_dataMethod · 0.95
_neg_byteorderMethod · 0.95
assert_array_equalFunction · 0.90
assert_Function · 0.90

Tested by

no test coverage detected