From 4946dbf929c2bbb2291cc0ebb5853f2353f6b3e1 Mon Sep 17 00:00:00 2001 From: Markus Hauru Date: Tue, 14 Jan 2025 17:42:37 +0000 Subject: [PATCH] Add test for Stacked with vectors --- test/ad/stacked.jl | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/test/ad/stacked.jl b/test/ad/stacked.jl index 63855410..89f5f4be 100644 --- a/test/ad/stacked.jl +++ b/test/ad/stacked.jl @@ -24,4 +24,15 @@ test_ad(y) do y sum(transform(binv, y)) end + + bvec = Stacked([b1, b2], [1:4, 5:5]) + bvec_inv = inverse(bvec) + + test_ad(y) do x + sum(transform(bvec, binv(x))) + end + + test_ad(y) do y + sum(transform(bvec_inv, y)) + end end