示例#1
0
    def test_mapparms(self):
        # test for real values
        dom1 = [0, 4]
        dom2 = [1, 3]
        tgt = [1, .5]
        res = pu.mapparms(dom1, dom2)
        assert_almost_equal(res, tgt)

        # test for complex values
        dom1 = [0 - 1j, 2 + 1j]
        dom2 = [-2, 2]
        tgt = [-1 + 1j, 1 - 1j]
        res = pu.mapparms(dom1, dom2)
        assert_almost_equal(res, tgt)
    def test_mapparms(self) :
        # test for real values
        dom1 = [0,4]
        dom2 = [1,3]
        tgt = [1, .5]
        res = pu. mapparms(dom1, dom2)
        assert_almost_equal(res, tgt)

        # test for complex values
        dom1 = [0 - 1j, 2 + 1j]
        dom2 = [-2, 2]
        tgt = [-1 + 1j, 1 - 1j]
        res = pu.mapparms(dom1, dom2)
        assert_almost_equal(res, tgt)
示例#3
0
文件: __init__.py 项目: 1950/sawbuck
def mapparms(old, new) :
    from numpy.polynomial.polyutils import mapparms
    return mapparms(old, new)
示例#4
0
def mapparms(old, new):
    from numpy.polynomial.polyutils import mapparms
    return mapparms(old, new)