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.
TensorSpace
1 parent a94565e commit 1ca49c0Copy full SHA for 1ca49c0
test/MultivariateTest.jl
@@ -550,4 +550,16 @@ using Base: oneto
550
@test g[1](x, y) ≈ 2x*y^3
551
@test g[2](x, y) ≈ x^2*3y^2
552
end
553
+
554
+ @testset "inference in TensorSpace" begin
555
+ s = @inferred TensorSpace((Chebyshev(0..1), Chebyshev(0.0..2.0)))
556
+ d = @inferred domain(s)
557
+ @test d == (0..1) × (0.0..2.0)
558
+ f = Fun((x,y)->x^2*y^3, s)
559
+ @test f(0.1, 0.2) ≈ 0.1^2 * 0.2^3
560
561
+ s2 = TensorSpace((Chebyshev(0..1), Chebyshev(0.0..2.0), Chebyshev(0..2)))
562
+ d2 = @inferred domain(s2)
563
+ @test d2 == (0..1) × (0.0..2.0) × (0..2)
564
+ end
565
0 commit comments