def test_getdomain(self): # test for real values x = [1, 10, 3, -1] tgt = [-1, 10] res = pu.getdomain(x) assert_almost_equal(res, tgt) # test for complex values x = [1 + 1j, 1 - 1j, 0, 2] tgt = [-1j, 2 + 1j] res = pu.getdomain(x) assert_almost_equal(res, tgt)
def test_getdomain(self) : # test for real values x = [1, 10, 3, -1] tgt = [-1,10] res = pu.getdomain(x) assert_almost_equal(res, tgt) # test for complex values x = [1 + 1j, 1 - 1j, 0, 2] tgt = [-1j, 2 + 1j] res = pu.getdomain(x) assert_almost_equal(res, tgt)
def getdomain(x): from numpy.polynomial.polyutils import getdomain return getdomain(x)
def getdomain(x) : from numpy.polynomial.polyutils import getdomain return getdomain(x)