Skip to content

Commit

Permalink
Merge pull request #63 from gerlero/revert-12
Browse files Browse the repository at this point in the history
Revert #12
  • Loading branch information
gerlero authored Dec 14, 2023
2 parents fbee4f6 + c90fb1e commit 71072fa
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 17 deletions.
6 changes: 0 additions & 6 deletions src/PCHIPInterpolation.jl
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,6 @@ struct Interpolator{Xs,Ys,Ds}
length(eachindex(xs, ys)) 2 || throw(ArgumentError("inputs must have at least 2 elements"))
_is_strictly_increasing(xs) || throw(ArgumentError("xs must be strictly increasing"))

xs = deepcopy(xs)
ys = deepcopy(ys)
ds = _pchip_ds_scipy(xs, ys)

new{typeof(xs),typeof(ys),typeof(ds)}(xs, ys, ds)
Expand All @@ -68,10 +66,6 @@ struct Interpolator{Xs,Ys,Ds}
length(eachindex(xs, ys, ds)) 2 || throw(ArgumentError("inputs must have at least 2 elements"))
_is_strictly_increasing(xs) || throw(ArgumentError("xs must be strictly increasing"))

xs = deepcopy(xs)
ys = deepcopy(ys)
ds = deepcopy(ds)

new{typeof(xs),typeof(ys),typeof(ds)}(xs, ys, ds)
end
end
Expand Down
11 changes: 0 additions & 11 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -343,17 +343,6 @@ end
@test itp(1) == 1
end

@testset "gh-11" begin
# Regression test for https://github.com/gerlero/PCHIPInterpolation.jl/issues/11
v = [1, 2, 3]
itp = Interpolator(v, v)
xs = copy(itp.xs)
ys = copy(itp.ys)
v .= -1
@test itp.xs == xs
@test itp.ys == ys
end

@testset "gh-31" begin
# Test correctness of _pchip_ds_scipy implementation following https://github.com/gerlero/PCHIPInterpolation.jl/issues/31
# Tests that the interpolated values are the same as SciPy
Expand Down

0 comments on commit 71072fa

Please sign in to comment.