File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -426,13 +426,9 @@ LinearAlgebra.transpose!(p::AbstractPolynomial) = p
426
426
Conversions =#
427
427
Base. convert (:: Type{P} , p:: P ) where {P <: AbstractPolynomial } = p
428
428
Base. convert (P:: Type{<:AbstractPolynomial} , x) = P (x)
429
- function Base. convert (:: Type{S} , p:: P ) where {S <: Number ,T, P<: AbstractPolynomial{T} }
430
- isconstant (p) && return convert (S, constantterm (p))
431
- throw (ArgumentError (" Can't convert a nonconstant polynomial to type $S " ))
432
- end
433
- function Base. convert (:: Type{T} , p:: AbstractPolynomial{T,X} ) where {T,X}
434
- isconstant (p) && return constantterm (p)
435
- throw (ArgumentError (" Can't convert a nonconstant polynomial to type $S " ))
429
+ function Base. convert (:: Type{T} , p:: AbstractPolynomial{T,X} ) where {T <: Number ,X}
430
+ isconstant (p) && return T (constantterm (p))
431
+ throw (ArgumentError (" Can't convert a nonconstant polynomial to type $T " ))
436
432
end
437
433
438
434
# Methods to ensure that matrices of polynomials behave as desired
You can’t perform that action at this time.
0 commit comments