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

Method test_mapparms

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

Source from the content-addressed store, hash-verified

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