Skip to content

Commit cf9301d

Browse files
authored
Deprecate order, use degree (#461)
* Deprecate `order`, use `degree` as in #457 * Add test for `order`
1 parent efeb466 commit cf9301d

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

src/common.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ export fromroots,
66
coeffs,
77
degree,
88
mapdomain,
9-
order,
109
hasnan,
1110
roots,
1211
companion,
@@ -586,6 +585,7 @@ has a nonzero coefficient. The degree of the zero polynomial is defined to be -1
586585
"""
587586
degree(p::AbstractPolynomial) = iszero(coeffs(p)) ? -1 : length(coeffs(p)) - 1 + min(0, minimumexponent(p))
588587

588+
@deprecate order degree true
589589

590590
"""
591591
Polynomials.domain(::Type{<:AbstractPolynomial})

test/ChebyshevT.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
@test p.coeffs == coeff
1111
@test coeffs(p) == coeff
1212
@test degree(p) == length(coeff) - 1
13+
@test (@test_deprecated order(p)) == length(coeff) - 1
1314
@test Polynomials.indeterminate(p) == :x
1415
@test length(p) == length(coeff)
1516
@test size(p) == size(coeff)

0 commit comments

Comments
 (0)