Skip to content

Commit

Permalink
Test stacking via the use of xarray.Dataset.expand_dims
Browse files Browse the repository at this point in the history
  • Loading branch information
sjperkins committed Mar 19, 2024
1 parent 8f2ff56 commit 9e4492f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/test_xarrayfits.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ def test_globbing(multiple_files):
combined.hdu0.data, np.concatenate([expected] * 3, axis=1)
)

tds = [ds.expand_dims(dim="time", axis=0) for ds in datasets]
combined = xarray.concat(tds, dim="time")
np.testing.assert_array_equal(combined.hdu0.data, np.stack([expected] * 3, axis=0))


@pytest.fixture(scope="session")
def beam_cube(tmp_path_factory):
Expand Down

0 comments on commit 9e4492f

Please sign in to comment.