Skip to content

Commit caa2d67

Browse files
committed
fix float32
1 parent e97e375 commit caa2d67

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

bayesflow/approximators/continuous_approximator.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -706,7 +706,8 @@ def compute_prior_score_pre(_samples: Tensor) -> Tensor:
706706
)
707707
prior_score = compute_prior_score(adapted_samples)
708708
for key in adapted_samples:
709-
prior_score[key] = prior_score[key]
709+
if isinstance(prior_score[key], np.ndarray):
710+
prior_score[key] = prior_score[key].astype("float32")
710711
if len(log_det_jac) > 0:
711712
prior_score[key] += log_det_jac[key]
712713

0 commit comments

Comments
 (0)