You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: test/io.jl
+30
Original file line number
Diff line number
Diff line change
@@ -40,12 +40,24 @@ using Test
40
40
41
41
itp =interpolate(knots, A, (Gridded(Linear()),Gridded(Constant())))
42
42
@testsummary(itp) =="8×20 interpolate((::Array{Int64,1},::Array{Float64,1}), ::Array{Float64,2}, (Gridded(Linear()), Gridded(Constant()))) with element type Float64"
43
+
44
+
# issue #260
45
+
A = (1:4)/4
46
+
itp =interpolate((range(0.0, stop=0.3, length=4),), A, Gridded(Linear()))
47
+
io =IOBuffer()
48
+
show(io, MIME("text/plain"), itp)
49
+
str =String(take!(io))
50
+
@test str =="4-element interpolate((0.0:0.1:0.3,), ::Array{Float64,1}, Gridded(Linear())) with element type Float64:\n 0.25\n 0.5 \n 0.75\n 1.0 "
43
51
end
44
52
45
53
@testset"scaled"begin
46
54
itp =interpolate(1:1.0:10, BSpline(Linear()))
47
55
sitp =scale(itp, -3:.5:1.5)
48
56
@testsummary(sitp) =="10-element scale(interpolate(::Array{Float64,1}, BSpline(Linear())), (-3.0:0.5:1.5,)) with element type Float64"
57
+
io =IOBuffer()
58
+
show(io, MIME("text/plain"), sitp)
59
+
str =String(take!(io))
60
+
@test str =="10-element scale(interpolate(::Array{Float64,1}, BSpline(Linear())), (-3.0:0.5:1.5,)) with element type Float64:\n 1.0\n 2.0\n 3.0\n 4.0\n 5.0\n 6.0\n 7.0\n 8.0\n 9.0\n 10.0"
0 commit comments