Skip to content

Commit

Permalink
Use only numerical columns for correlation matrix (#45)
Browse files Browse the repository at this point in the history
* Use only numerical column for correlation matrix

* Use pandas isnumeric function instead of checking for np.number
  • Loading branch information
Hans Kallekleiv authored Aug 7, 2019
1 parent 9416c5b commit 6da7651
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion webviz_subsurface/containers/_parameter_distribution.py
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,8 @@ def render_scatter(ens1, x_col, ens2, y_col, color, density):
@cache.memoize(timeout=cache.TIMEOUT)
def render_matrix(ensemble_path):

data = get_parameters(ensemble_path)
data = get_parameters(ensemble_path).apply(pd.to_numeric, errors='coerce')\
.dropna(how='all', axis='columns')
values = list(data.corr().values)

data = {
Expand Down

0 comments on commit 6da7651

Please sign in to comment.