Mercurial > repos > public > sbplib_julia
comparison test/Grids/grid_test.jl @ 1556:ec5e7926c37b
Merge refactor/equidistant_grid/signature
author | Jonatan Werpers <jonatan@werpers.com> |
---|---|
date | Sat, 13 Apr 2024 23:49:39 +0200 |
parents | 43aaf710463e |
children | 471a948cd2b2 |
comparison
equal
deleted
inserted
replaced
1553:f1eacb923f45 | 1556:ec5e7926c37b |
---|---|
45 | 45 |
46 @test eval_on(EquidistantGrid(range(0,1,length=4)), x->2x) isa LazyArray | 46 @test eval_on(EquidistantGrid(range(0,1,length=4)), x->2x) isa LazyArray |
47 @test eval_on(EquidistantGrid(range(0,1,length=4)), x->2x) == 2 .* range(0,1,length=4) | 47 @test eval_on(EquidistantGrid(range(0,1,length=4)), x->2x) == 2 .* range(0,1,length=4) |
48 | 48 |
49 | 49 |
50 g = equidistant_grid((5,3), (0.0,0.0), (2.0,1.0)) | 50 g = equidistant_grid((0.0,0.0), (2.0,1.0), 5, 3) |
51 | 51 |
52 @test eval_on(g, x̄ -> 0.) isa LazyArray | 52 @test eval_on(g, x̄ -> 0.) isa LazyArray |
53 @test eval_on(g, x̄ -> 0.) == fill(0., (5,3)) | 53 @test eval_on(g, x̄ -> 0.) == fill(0., (5,3)) |
54 | 54 |
55 @test eval_on(g, x̄ -> sin(x̄[1])*cos(x̄[2])) == map(x̄->sin(x̄[1])*cos(x̄[2]), g) | 55 @test eval_on(g, x̄ -> sin(x̄[1])*cos(x̄[2])) == map(x̄->sin(x̄[1])*cos(x̄[2]), g) |