Skip to content

Commit

Permalink
Remove intermediate variables
Browse files Browse the repository at this point in the history
  • Loading branch information
yngve-sk committed Oct 3, 2024
1 parent e42bc49 commit fa529d2
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/ert/config/observation_vector.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@ def __len__(self) -> int:

def to_dataset(self, active_list: List[int]) -> polars.DataFrame:
if self.observation_type == EnkfObservationImplementationType.GEN_OBS:
actual_response_key = self.data_key
actual_observation_key = self.observation_key
dataframes = []
for time_step, node in self.observations.items():
if active_list and time_step not in active_list:
Expand All @@ -42,8 +40,8 @@ def to_dataset(self, active_list: List[int]) -> polars.DataFrame:
dataframes.append(
polars.DataFrame(
{
"response_key": actual_response_key,
"observation_key": actual_observation_key,
"response_key": self.data_key,
"observation_key": self.observation_key,
"report_step": polars.Series(
np.full(len(node.indices), time_step),
dtype=polars.UInt16,
Expand Down

0 comments on commit fa529d2

Please sign in to comment.