Skip to content

Commit

Permalink
fix call to _fit, close issue JuliaMath#295
Browse files Browse the repository at this point in the history
  • Loading branch information
jverzani committed Nov 20, 2020
1 parent f556a80 commit 449bb01
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/common.jl
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ function fit(P::Type{<:AbstractPolynomial},
deg::Integer = length(x) - 1;
weights = nothing,
var = :x,) where {T}
_fit(P, x, y, deg, weights, var)
_fit(P, x, y, deg; weights=weights, var=var)
end

fit(P::Type{<:AbstractPolynomial},
Expand Down
10 changes: 10 additions & 0 deletions test/ChebyshevT.jl
Original file line number Diff line number Diff line change
Expand Up @@ -201,3 +201,13 @@ end
@test q == [1]
@test r == [0]
end


@testset "closed issues" begin

# issue #295
x = BigFloat[-2/3, -1/3, 1/3, 2/4]
y = BigFloat[1, 2, 3, 4]
fit(ChebyshevT, x, y, 1)

end

0 comments on commit 449bb01

Please sign in to comment.