From f3669e3e7c95f76dae971ec97f5489a9f76c6656 Mon Sep 17 00:00:00 2001 From: john verzani Date: Thu, 9 Mar 2023 18:34:54 -0500 Subject: [PATCH] less typed return of fit (#478) * less typed return of fit * version bump --- Project.toml | 2 +- src/common.jl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Project.toml b/Project.toml index 745f7844..21c22ef5 100644 --- a/Project.toml +++ b/Project.toml @@ -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" diff --git a/src/common.jl b/src/common.jl index 7ba47e4c..f83824b0 100644 --- a/src/common.jl +++ b/src/common.jl @@ -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