From d9330988e6f23f929e99c30eb597e69a6f67dd5e Mon Sep 17 00:00:00 2001 From: "Steven G. Johnson" Date: Tue, 16 May 2023 14:03:13 -0400 Subject: [PATCH] update CI badge (#15) * update CI badge * fix test failure on Julia 1.3 --- .travis.yml | 10 ---------- README.md | 4 ++-- test/runtests.jl | 4 ++-- 3 files changed, 4 insertions(+), 14 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 94d99ba..0000000 --- a/.travis.yml +++ /dev/null @@ -1,10 +0,0 @@ -language: julia -os: - - linux -julia: - - 1.3 - - 1.4 - - 1.5 - - nightly -notifications: - email: false diff --git a/README.md b/README.md index 51959d7..93b9414 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # FastChebInterp -[![Build Status](https://travis-ci.org/stevengj/FastChebInterp.jl.svg?branch=master)](https://travis-ci.org/stevengj/FastChebInterp.jl) +[![CI](https://github.com/JuliaMath/FastChebInterp.jl/workflows/CI/badge.svg)](https://github.com/JuliaMath/FastChebInterp.jl/actions?query=workflow%3ACI) Fast multidimensional Chebyshev interpolation on a hypercube (Cartesian-product) domain, using a separable (tensor-product) grid of Chebyshev interpolation points, as well as Chebyshev regression (least-square fits) from an arbitrary set of points. In both cases we support arbitrary dimensionality, complex and vector-valued functions, and fast derivative and Jacobian computation. @@ -63,7 +63,7 @@ julia> cos(2x + 3cos(4x)) * (2 - 12sin(4x)) # exact derivative ``` Interpolation is most efficient and accurate if we evaluate our function at the points given by `chebpoints`. However, we can also perform least-square polynomial fitting (in the Chebyshev basis, which is well behaved even at high degree) from an *arbitrary* set of points — this is useful if the points were specified externally, or if we want to "smooth" the data by fitting to a polynomial of lower degree than for interpolation. For example, we can fit the same function above, again to a degree-200 Chebyshev polynomial, using 10000 *random* points in the domain: -```jl +```jl xr = rand(10000) * 10 # 10000 uniform random points in [0, 10] c = chebregression(xr, f.(xr), 0, 10, 200) # fit to a degree-200 polynomial ```jl diff --git a/test/runtests.jl b/test/runtests.jl index 3e64b99..6d96b74 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -37,7 +37,7 @@ end interp0 = chebinterp(f.(x), lb, ub, tol=0) @test repr("text/plain", interp0) == "ChebPoly{2,$T,$T} order (48, 39) polynomial on [-0.3,0.9] × [0.1,1.2]" @test ndims(interp) == 2 - x1 = T[0.2, 0.3] + x1 = T[0.2, 0.8] # not too close to boundary or test_frule can fail by taking a big FD step @test interp(x1) ≈ f(x1) @test interp(x1) ≈ interp0(x1) rtol=10eps(T) @test all(n -> n[1] < n[2], zip(size(interp.coefs), size(interp0.coefs))) @@ -148,4 +148,4 @@ end @test interp([0,0]) ≈ 3*cos(0.55) @test interp([0.1,0.22]) ≈ 3.2*cos(0.55) @test chebgradient(interp, [0.1,0.2])[2] == [2*cos(0.55), 0] -end \ No newline at end of file +end