Skip to content

Commit

Permalink
CI: add single mpi sparse test
Browse files Browse the repository at this point in the history
  • Loading branch information
mloubout committed Jul 1, 2024
1 parent 1148087 commit daa9ee7
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/test_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,17 @@ def test_indexing_into_sparse(self):
sf.data[1:-1, 0] = np.arange(8)
assert np.all(sf.data[1:-1, 0] == np.arange(8))

@pytest.mark.parallel(mode=1)
def test_indexing_into_sparse_subfunc_singlempi(self, mode):
grid = Grid(shape=(4, 4))
s = SparseFunction(name='sf', grid=grid, npoint=1)
coords = np.random.rand(*s.coordinates.data.shape)
s.coordinates.data[:] = coords

s.coordinates.data[-1, :] = s.coordinates.data[-1, :] / 2

assert np.allclose(s.coordinates.data[-1, :], coords[-1, :] / 2)


class TestLocDataIDX:
"""
Expand Down

0 comments on commit daa9ee7

Please sign in to comment.