Skip to content

Commit

Permalink
Use rangestring_to_list instead of IntVector
Browse files Browse the repository at this point in the history
  • Loading branch information
eivindjahren committed Jan 12, 2024
1 parent 1742690 commit bb5fa0d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/ert/config/observations.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit bb5fa0d

Please sign in to comment.