We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0af590e commit 9371ce3Copy full SHA for 9371ce3
test/autodiff_tests.jl
@@ -32,7 +32,15 @@ truth = [-400, 200]
32
@test zygote_full.x ≈ truth
33
end
34
35
- @test ComponentArray(x=4,) == Zygote.gradient(ComponentArray(x=2,)) do c
36
- (;c...,).x^2
37
- end[1]
+ # Not sure why this doesn't work in v1.2, but I don't want to drop the tests for that just
+ # for this to work
+ if VERSION ≥ v"1.6"
38
+ @test ComponentArray(x=4,) == Zygote.gradient(ComponentArray(x=2,)) do c
39
+ (;c...,).x^2
40
+ end[1]
41
+ else
42
+ @test_skip ComponentArray(x=4,) == Zygote.gradient(ComponentArray(x=2,)) do c
43
44
45
+ end
46
0 commit comments