From bb5fa0d66c888fa015ea61d3d4f3d773dabbf56f Mon Sep 17 00:00:00 2001 From: Eivind Jahren Date: Fri, 12 Jan 2024 11:33:50 +0100 Subject: [PATCH] Use rangestring_to_list instead of IntVector --- src/ert/config/observations.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/ert/config/observations.py b/src/ert/config/observations.py index 9f0816d9afc..1e735b90074 100644 --- a/src/ert/config/observations.py +++ b/src/ert/config/observations.py @@ -5,9 +5,9 @@ import numpy as np import xarray as xr from resdata.summary import SummaryVarType -from resdata.util.util import IntVector from ert._clib.enkf_obs import read_from_refcase +from ert.validation import rangestring_to_list from .enkf_observation_implementation_type import EnkfObservationImplementationType from .gen_data_config import GenDataConfig @@ -371,7 +371,9 @@ def _create_gen_obs( if os.path.isfile(data_index): indices = np.loadtxt(data_index, delimiter=None, dtype=int).ravel() else: - indices = np.array(IntVector.active_list(data_index), dtype=np.int32) + indices = np.array( + sorted(rangestring_to_list(data_index)), dtype=np.int32 + ) else: indices = np.arange(len(values)) std_scaling = np.full(len(values), 1.0)