Skip to content

Commit

Permalink
update CI badge (#15)
Browse files Browse the repository at this point in the history
* update CI badge

* fix test failure on Julia 1.3
  • Loading branch information
stevengj committed May 16, 2023
1 parent 8e7d8cb commit d933098
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 14 deletions.
10 changes: 0 additions & 10 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions 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.
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions test/runtests.jl
Expand Up @@ -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)))
Expand Down Expand Up @@ -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
end

0 comments on commit d933098

Please sign in to comment.