Skip to content

Commit

Permalink
test: add tests for zygote rules with matrix inputs
Browse files Browse the repository at this point in the history
  • Loading branch information
sathvikbhagavan committed Jan 21, 2025
1 parent ec804ba commit 977f085
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/zygote_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -51,12 +51,18 @@ end
t = collect(1.0:10.0)
test_zygote(
LinearInterpolation, u, t; name = "Linear Interpolation")
u2 = Matrix(hcat(u, u)')
test_zygote(
LinearInterpolation, u2, t; name = "Linear Interpolation with matrix input")
end

@testset "Quadratic Interpolation" begin
u = [1.0, 4.0, 9.0, 16.0]
t = [1.0, 2.0, 3.0, 4.0]
test_zygote(QuadraticInterpolation, u, t; name = "Quadratic Interpolation")
u2 = Matrix(hcat(u, u)')
test_zygote(
QuadraticInterpolation, u2, t; name = "Quadratic Interpolation with matrix input")
end

@testset "Constant Interpolation" begin
Expand Down

0 comments on commit 977f085

Please sign in to comment.