Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
sec23
korte
CORBASS
Commits
645e99d3
Commit
645e99d3
authored
Feb 27, 2020
by
Maximilian Schanner
Browse files
empty_like -> zeros_like
parent
cce95933
Changes
1
Hide whitespace changes
Inline
Side-by-side
corbass/evaluation.py
View file @
645e99d3
...
...
@@ -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
)
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
):
var
+=
cov_coeffs
[
it
].
diagonal
()
\
...
...
@@ -343,7 +343,7 @@ def spectrum(posterior, mu_coeffs, cov_coeffs, r_ref, r_at=REARTH):
# 1st two moments of mixture
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
):
cov
+=
cov_coeffs
[
it
]
\
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment