Skip to content

Commit 3f7e9f8

Browse files
committed
v0.7 deprecation fixes
1 parent 1b9aeee commit 3f7e9f8

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/DiffTests.jl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -252,17 +252,17 @@ const INPLACE_ARRAY_TO_ARRAY_FUNCS = (chebyquad!, brown_almost_linear!, trigonom
252252
# f(x::Array)::Array #
253253
######################
254254

255-
chebyquad(x) = (y = zeros(x); chebyquad!(y, x); return y)
255+
chebyquad(x) = (y = fill(zero(eltype(x)), size(x)); chebyquad!(y, x); return y)
256256

257-
brown_almost_linear(x) = (y = zeros(x); brown_almost_linear!(y, x); return y)
257+
brown_almost_linear(x) = (y = fill(zero(eltype(x)), size(x)); brown_almost_linear!(y, x); return y)
258258

259-
trigonometric(x) = (y = ones(x); trigonometric!(y, x); return y)
259+
trigonometric(x) = (y = fill(one(eltype(x)), size(x)); trigonometric!(y, x); return y)
260260

261-
mutation_test_1(x) = (y = zeros(x); mutation_test_1!(y, x); return y)
261+
mutation_test_1(x) = (y = fill(zero(eltype(x)), size(x)); mutation_test_1!(y, x); return y)
262262

263-
mutation_test_2(x) = (y = ones(x); mutation_test_2!(y, x); return y)
263+
mutation_test_2(x) = (y = fill(one(eltype(x)), size(x)); mutation_test_2!(y, x); return y)
264264

265-
arr2arr_1(x) = (sum(x .* x); zeros(x))
265+
arr2arr_1(x) = (sum(x .* x); fill(zero(eltype(x)), size(x)))
266266

267267
arr2arr_2(x) = x[1, :] .+ x[1, :] .+ first(x)
268268

0 commit comments

Comments
 (0)