diff --git a/src/PCHIPInterpolation.jl b/src/PCHIPInterpolation.jl index 7bedbb3..3ab7687 100644 --- a/src/PCHIPInterpolation.jl +++ b/src/PCHIPInterpolation.jl @@ -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) @@ -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 diff --git a/test/runtests.jl b/test/runtests.jl index 5691d8a..cf74736 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -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