Skip to content

Commit de41fa5

Browse files
authored
Replace deprecated datatype alias (hpc4cmb#937)
* Replace deprecated datatype alias * Missed a spot
1 parent 602110b commit de41fa5

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/toast/noise.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2015-2020 by the parties listed in the AUTHORS file.
1+
# Copyright (c) 2015-2026 by the parties listed in the AUTHORS file.
22
# All rights reserved. Use of this source code is governed by
33
# a BSD-style license that can be found in the LICENSE file.
44

@@ -547,8 +547,8 @@ def _save_base_hdf5(self, hf, obs):
547547
maxstr = max(maxstr, len(strm))
548548
mixdata.append((det, strm, weight))
549549
maxstr += 1
550-
mixdtype = np.dtype(f"a{maxstr}, a{maxstr}, f4")
551-
wtdtype = np.dtype(f"a{maxstr}, f4")
550+
mixdtype = np.dtype(f"S{maxstr}, S{maxstr}, f4")
551+
wtdtype = np.dtype(f"S{maxstr}, f4")
552552
n_mix = len(mixdata)
553553
n_det = len(props["dets"])
554554
wtunit = props["weights"][props["dets"][0]].unit
@@ -670,7 +670,7 @@ def _save_base_hdf5(self, hf, obs):
670670
inds = hf.create_dataset(
671671
f"{fhash}_indices", (meta["n_psd"],), dtype=np.uint32
672672
)
673-
keytype = np.dtype(f"a{maxstr}")
673+
keytype = np.dtype(f"S{maxstr}")
674674
kds = hf.create_dataset(
675675
f"{fhash}_keys", (meta["n_psd"],), dtype=keytype
676676
)

src/toast/noise_sim.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2015-2020 by the parties listed in the AUTHORS file.
1+
# Copyright (c) 2015-2026 by the parties listed in the AUTHORS file.
22
# All rights reserved. Use of this source code is governed by
33
# a BSD-style license that can be found in the LICENSE file.
44

@@ -251,7 +251,7 @@ def _save_hdf5(self, handle, obs, **kwargs):
251251
ds = None
252252
if handle is not None:
253253
# Write the noise model parameters as a dataset
254-
adtype = np.dtype(f"a{maxstr}, f8, f8, f8, f8, f8")
254+
adtype = np.dtype(f"S{maxstr}, f8, f8, f8, f8, f8")
255255
ds = handle.create_dataset("analytic", (n_det,), dtype=adtype)
256256
if gcomm is not None:
257257
gcomm.barrier()

0 commit comments

Comments
 (0)