Skip to content

Commit 91540c5

Browse files
committed
tests: Update input grid to honour SubDomain rules
1 parent 68f52ce commit 91540c5

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

‎tests/test_builtins.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,8 @@ def test_gs_1d_int(self, sigma):
147147
def test_gs_1d_float(self, sigma):
148148
"""Test the Gaussian smoother in 1d on array of float."""
149149

150-
a = np.array([1.2, 2.7, 3.9, 4.1, 5.2, 6.5, 7.1, 9.3, 11.0])
150+
a = np.array([1.2, 2.7, 3.9, 4.1, 5.2, 6.5, 7.1, 9.3, 11.0,
151+
8.7, 6.4, 4.6, 3.1, 2.9, 1.4, 0.8, 2.3])
151152
sp_smoothed = gaussian_filter(a, sigma=sigma)
152153
dv_smoothed = gaussian_smooth(a, sigma=sigma)
153154

‎tests/test_dse.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ def test_full_shape_w_subdims(self, rotate):
586586
"""
587587
Like `test_full_shape`, but SubDomains (and therefore SubDimensions) are used.
588588
"""
589-
grid = Grid(shape=(3, 3, 3))
589+
grid = Grid(shape=(5, 5, 5))
590590
x, y, z = grid.dimensions
591591
t = grid.stepping_dim
592592

@@ -753,12 +753,12 @@ def test_mixed_shapes_v2_w_subdims(self, rotate):
753753
Analogous `test_mixed_shapes`, but with different sets of aliasing expressions.
754754
Also, uses SubDimensions.
755755
"""
756-
grid = Grid(shape=(3, 3, 3))
756+
grid = Grid(shape=(5, 5, 5))
757757
x, y, z = grid.dimensions
758758
t = grid.stepping_dim
759759
d = Dimension(name='d')
760760

761-
c = Function(name='c', grid=grid, shape=(2, 3), dimensions=(d, z))
761+
c = Function(name='c', grid=grid, shape=(2, 5), dimensions=(d, z))
762762
u = TimeFunction(name='u', grid=grid, space_order=3)
763763
u1 = TimeFunction(name='u1', grid=grid, space_order=3)
764764

0 commit comments

Comments
 (0)