Skip to content

Commit

Permalink
[FIX] Replaced Float32 in bifrost.py
Browse files Browse the repository at this point in the history
  • Loading branch information
tiagopereira committed May 2, 2024
1 parent 96c04ed commit 57df19b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions helita/sim/bifrost.py
Original file line number Diff line number Diff line change
Expand Up @@ -1186,7 +1186,7 @@ def get_hydrogen_pops(self, sx=slice(None), sy=slice(None), sz=slice(None)):
if slice_size == 0:
slice_size = n
shape.append(slice_size)
nh = np.empty(shape, dtype='Float32')
nh = np.empty(shape, dtype=np.float32)
for k in range(6):
nv = self.get_var('n%i' % (k + 1))
nh[k] = nv[sx, sy, sz]
Expand Down Expand Up @@ -2104,7 +2104,7 @@ def _N_to_snapstr(N):

def write_br_snap(rootname, r, px, py, pz, e, bx, by, bz):
nx, ny, nz = r.shape
data = np.memmap(rootname, dtype='float32', mode='w+', order='f', shape=(nx, ny, nz, 8))
data = np.memmap(rootname, dtype=np.float32, mode='w+', order='f', shape=(nx, ny, nz, 8))
data[..., 0] = r
data[..., 1] = px
data[..., 2] = py
Expand Down

0 comments on commit 57df19b

Please sign in to comment.