Skip to content

Commit

Permalink
modified: test_utils.py
Browse files Browse the repository at this point in the history
  • Loading branch information
nkern committed Feb 7, 2024
1 parent 68f5882 commit aa692f1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions py21cmnet/tests/test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,14 +77,14 @@ def test_parse_activation():


def test_load_21cmfast():
a = np.random.randn(1000).astype(np.float).reshape(10, 10, 10)
a = np.random.randn(1000).astype(np.float64).reshape(10, 10, 10)
fname = os.path.join(DATA_PATH, "_xyz_testfile")
a.tofile(fname)

box = utils.load_21cmfast(fname, dtype=np.float, N=10)
box = utils.load_21cmfast(fname, dtype=np.float64, N=10)
assert np.isclose(a, box).all()

box = utils.load_21cmfast([fname, fname], dtype=np.float, N=10)
box = utils.load_21cmfast([fname, fname], dtype=np.float64, N=10)
assert np.isclose(a, np.array([box, box])).all()

os.remove(fname)
Expand Down

0 comments on commit aa692f1

Please sign in to comment.