Commit 645e99d3 authored by Maximilian Schanner's avatar Maximilian Schanner
Browse files

empty_like -> zeros_like

parent cce95933
...@@ -291,7 +291,7 @@ def coeffs(posterior, mu_coeffs, cov_coeffs, r_ref, r_at=REARTH): ...@@ -291,7 +291,7 @@ def coeffs(posterior, mu_coeffs, cov_coeffs, r_ref, r_at=REARTH):
err_16, err_84 = np.percentile(ens, (16, 84), axis=1) err_16, err_84 = np.percentile(ens, (16, 84), axis=1)
mean = (mu_coeffs.T * gm_weights.flatten()).sum(axis=1) mean = (mu_coeffs.T * gm_weights.flatten()).sum(axis=1)
var = np.empty_like(mean) var = np.zeros_like(mean)
for it in range(gm_weights.size): for it in range(gm_weights.size):
var += cov_coeffs[it].diagonal() \ var += cov_coeffs[it].diagonal() \
...@@ -343,7 +343,7 @@ def spectrum(posterior, mu_coeffs, cov_coeffs, r_ref, r_at=REARTH): ...@@ -343,7 +343,7 @@ def spectrum(posterior, mu_coeffs, cov_coeffs, r_ref, r_at=REARTH):
# 1st two moments of mixture # 1st two moments of mixture
mean = np.sum(mu_coeffs * gm_weights.flatten()[:, None], axis=0) mean = np.sum(mu_coeffs * gm_weights.flatten()[:, None], axis=0)
cov = np.empty_like(cov_coeffs[0]) cov = np.zeros_like(cov_coeffs[0])
for it in range(gm_weights.size): for it in range(gm_weights.size):
cov += cov_coeffs[it] \ cov += cov_coeffs[it] \
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment