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

Method test_simple_nonnative

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

Source from the content-addressed store, hash-verified

2407 assert_array_strict_equal(ac, act)
2408
2409 def test_simple_nonnative(self):
2410 # Test non native double input with scalar min/max.
2411 # Test native double input with non native double scalar min/max.
2412 a = self._generate_non_native_data(self.nr, self.nc)
2413 m = -0.5
2414 M = 0.6
2415 ac = self.fastclip(a, m, M)
2416 act = self.clip(a, m, M)
2417 assert_array_equal(ac, act)
2418
2419 # Test native double input with non native double scalar min/max.
2420 a = self._generate_data(self.nr, self.nc)
2421 m = -0.5
2422 M = self._neg_byteorder(0.6)
2423 assert_(not M.dtype.isnative)
2424 ac = self.fastclip(a, m, M)
2425 act = self.clip(a, m, M)
2426 assert_array_equal(ac, act)
2427
2428 def test_simple_complex(self):
2429 # 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