Skip to content
Snippets Groups Projects
Commit 38b30527 authored by Colm Talbot's avatar Colm Talbot
Browse files

MAINT: fixes for numpy>=2

parent 6c8678ff
No related branches found
No related tags found
No related merge requests found
......@@ -264,9 +264,9 @@ def encode_for_hdf5(key, item):
if isinstance(item, np.int_):
item = int(item)
elif isinstance(item, np.float_):
elif isinstance(item, np.float64):
item = float(item)
elif isinstance(item, np.complex_):
elif isinstance(item, np.complex128):
item = complex(item)
if isinstance(item, np.ndarray):
# Numpy's wide unicode strings are not supported by hdf5
......
......@@ -1436,7 +1436,7 @@ class HealPixMapPriorDist(BaseJointPriorDist):
self.update_distance(int(round(val)))
dist_samples[i] = self.distance_icdf(dist_samp[i])
if self.distance:
sample = np.row_stack([sample[:, 0], sample[:, 1], dist_samples])
sample = np.vstack([sample[:, 0], sample[:, 1], dist_samples])
return sample.reshape((-1, self.num_vars))
def update_distance(self, pix_idx):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment