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

Method test_mapparms

numpy/polynomial/tests/test_polyutils.py:108–121  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

106 assert_(isinstance(res, MyNDArray))
107
108 def test_mapparms(self):
109 # test for real values
110 dom1 = [0, 4]
111 dom2 = [1, 3]
112 tgt = [1, .5]
113 res = pu. mapparms(dom1, dom2)
114 assert_almost_equal(res, tgt)
115
116 # test for complex values
117 dom1 = [0 - 1j, 2 + 1j]
118 dom2 = [-2, 2]
119 tgt = [-1 + 1j, 1 - 1j]
120 res = pu.mapparms(dom1, dom2)
121 assert_almost_equal(res, tgt)

Callers

nothing calls this directly

Calls 2

assert_almost_equalFunction · 0.90
mapparmsMethod · 0.80

Tested by

no test coverage detected