Skip to content

Commit

Permalink
less typed return of fit (#478)
Browse files Browse the repository at this point in the history
* less typed return of fit

* version bump
  • Loading branch information
jverzani authored Mar 9, 2023
1 parent 44679d0 commit f3669e3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Project.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name = "Polynomials"
uuid = "f27b6e38-b328-58d1-80ce-0feddd5e7a45"
license = "MIT"
author = "JuliaMath"
version = "3.2.6"
version = "3.2.7"

[deps]
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"
Expand Down
4 changes: 2 additions & 2 deletions src/common.jl
Original file line number Diff line number Diff line change
Expand Up @@ -154,13 +154,13 @@ function _fit(P::Type{<:AbstractPolynomial},
end
R = float(T)
if isa(deg, Integer)
return P{R, Symbol(var)}(R.(coeffs))
return P(R.(coeffs), var)
else
cs = zeros(T, 1 + maximum(deg))
for (i,aᵢ) zip(deg, coeffs)
cs[1 + i] = aᵢ
end
return P{R, Symbol(var)}(cs)
return P(cs, var)
end


Expand Down

2 comments on commit f3669e3

@jverzani
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JuliaRegistrator
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Registration pull request created: JuliaRegistries/General/79298

After the above pull request is merged, it is recommended that a tag is created on this repository for the registered package version.

This will be done automatically if the Julia TagBot GitHub Action is installed, or can be done manually through the github interface, or via:

git tag -a v3.2.7 -m "<description of version>" f3669e3e7c95f76dae971ec97f5489a9f76c6656
git push origin v3.2.7

Please sign in to comment.