From 1bc9d5c8c6b98a7269397a2c5ff9f2a1fed6733d Mon Sep 17 00:00:00 2001 From: Francesco Andreuzzi Date: Wed, 16 Feb 2022 23:48:59 +0100 Subject: [PATCH 1/2] use 'np.polynomial.chebyshev.chebroots' instead of 'np.roots' --- pina/chebyshev.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pina/chebyshev.py b/pina/chebyshev.py index 6a9fa15..89cb1e6 100644 --- a/pina/chebyshev.py +++ b/pina/chebyshev.py @@ -1,6 +1,7 @@ -from mpmath import chebyt, chop, taylor import numpy as np def chebyshev_roots(n): """ Return the roots of *n* Chebyshev polynomials (between [-1, 1]) """ - return np.roots(chop(taylor(lambda x: chebyt(n, x), 0, n))[::-1]) + coefficents = np.zeros(n+1) + coefficents[-1] = 1 + return np.polynomial.chebyshev.chebroots(coefficents) From 66dfa79428ad0ce5ebd4b93f85dd186d79a52e8a Mon Sep 17 00:00:00 2001 From: Nicola Demo Date: Thu, 17 Feb 2022 09:43:48 +0100 Subject: [PATCH 2/2] remove mpmath dep --- setup.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/setup.py b/setup.py index e9370e6..be05c8f 100644 --- a/setup.py +++ b/setup.py @@ -14,8 +14,7 @@ VERSION = meta['__version__'] KEYWORDS = 'physics-informed neural-network' REQUIRED = [ - 'future', 'numpy', 'matplotlib', 'torch', 'mpmath' - + 'future', 'numpy', 'matplotlib', 'torch' ] EXTRAS = {