diff options
author | Weh Andreas <andreas.weh@student.uni-augsburg.de> | 2021-01-14 11:38:42 +0100 |
---|---|---|
committer | Weh Andreas <andreas.weh@student.uni-augsburg.de> | 2021-01-14 11:38:42 +0100 |
commit | 2caecfb70024cddafb13ef2c113f9dc1e3e0acc5 (patch) | |
tree | 17a6a6f486902709c5da8aec402ed44a81af986d /numpy | |
parent | 662f973ba58563b268d009e67806aa1150ca1cb2 (diff) | |
download | numpy-2caecfb70024cddafb13ef2c113f9dc1e3e0acc5.tar.gz |
Use sinus based formula for `chebpts1`
Diffstat (limited to 'numpy')
-rw-r--r-- | numpy/polynomial/chebyshev.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/numpy/polynomial/chebyshev.py b/numpy/polynomial/chebyshev.py index 1149cdffa..4d0a4f483 100644 --- a/numpy/polynomial/chebyshev.py +++ b/numpy/polynomial/chebyshev.py @@ -1952,8 +1952,8 @@ def chebpts1(npts): if _npts < 1: raise ValueError("npts must be >= 1") - x = np.linspace(-np.pi, 0, _npts, endpoint=False) + np.pi/(2*_npts) - return np.cos(x) + x = 0.5 * np.pi / _npts * np.arange(-_npts+1, _npts+1, 2) + return np.sin(x) def chebpts2(npts): |