Skip to content

Commit b88ae3d

Browse files
committed
switch to using fills
1 parent 13d81b4 commit b88ae3d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/polynomials/ChebyshevT.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,9 +155,9 @@ function companion(p::ChebyshevT{T}) where T
155155
d == 1 && return diagm(0 => [-p[0] / p[1]])
156156
R = eltype(one(T) / one(T))
157157

158-
scl = vcat(1.0, 0.5 .* ones(R, d - 1))
158+
scl = vcat(1.0, fill(R(0.5), d - 1))
159159

160-
diag = vcat(0.5, ones(R, d - 2) ./ 2)
160+
diag = vcat(0.5, fill(R(0.5), d - 2))
161161
comp = diagm(1 => diag,
162162
-1 => diag)
163163
monics = p.coeffs ./ p.coeffs[end]

test/ChebyshevT.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ end
178178
@testset "z-series" for i in 0:5
179179
# c to z
180180
input = vcat(2, ones(i))
181-
target = vcat(0.5 .* ones(i), 2, 0.5 .* ones(i))
181+
target = vcat(fill(0.5, i), 2, fill(0.5, i))
182182
zs = Polynomials._c_to_z(input)
183183
@test zs == target
184184
c = Polynomials._z_to_c(zs)

0 commit comments

Comments
 (0)