Skip to content

Commit

Permalink
Remove unnecessary argument
Browse files Browse the repository at this point in the history
  • Loading branch information
yngve-sk committed Nov 28, 2024
1 parent b18d156 commit 25ac827
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 16 deletions.
4 changes: 2 additions & 2 deletions src/ert/dark_storage/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def data_for_key(
if response_type == "summary":
summary_data = ensemble.load_responses(
response_key,
tuple(ensemble.get_realization_list_with_responses(response_key)),
tuple(ensemble.get_realization_list_with_responses()),
)
if summary_data.is_empty():
return pd.DataFrame()
Expand Down Expand Up @@ -153,7 +153,7 @@ def data_for_key(
response_key, report_step = displayed_key_to_response_key["gen_data"](
key
)
mask = ensemble.get_realization_mask_with_responses(response_key)
mask = ensemble.get_realization_mask_with_responses()
realizations = np.where(mask)[0]
data = ensemble.load_responses(response_key, tuple(realizations))
except ValueError as err:
Expand Down
4 changes: 1 addition & 3 deletions src/ert/data/_measured_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,9 +110,7 @@ def _get_data(
)
responses_for_type = ensemble.load_responses(
response_type,
realizations=tuple(
ensemble.get_realization_list_with_responses(response_type)
),
realizations=tuple(ensemble.get_realization_list_with_responses()),
)

if responses_for_type.is_empty():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,7 @@ def run(
"active for exactly one report step"
)

realizations = ensemble.get_realization_list_with_responses(
response_key
)
realizations = ensemble.get_realization_list_with_responses()
responses = ensemble.load_responses(response_key, tuple(realizations))
joined = obs_df.join(
responses,
Expand Down
10 changes: 3 additions & 7 deletions src/ert/storage/local_ensemble.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,9 +233,7 @@ def get_realization_mask_with_parameters(self) -> npt.NDArray[np.bool_]:
]
)

def get_realization_mask_with_responses(
self, key: Optional[str] = None
) -> npt.NDArray[np.bool_]:
def get_realization_mask_with_responses(self) -> npt.NDArray[np.bool_]:
"""
Mask array indicating realizations with associated responses.
Expand Down Expand Up @@ -322,9 +320,7 @@ def realizations_initialized(self, realizations: List[int]) -> bool:

return all((responses[real] or parameters[real]) for real in realizations)

def get_realization_list_with_responses(
self, key: Optional[str] = None
) -> List[int]:
def get_realization_list_with_responses(self) -> List[int]:
"""
List of realization indices with associated responses.
Expand All @@ -339,7 +335,7 @@ def get_realization_list_with_responses(
List of realization indices with associated responses.
"""

mask = self.get_realization_mask_with_responses(key)
mask = self.get_realization_mask_with_responses()
return np.where(mask)[0].tolist()

def set_failure(
Expand Down
2 changes: 1 addition & 1 deletion tests/ert/unit_tests/storage/test_storage_migration.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def test_that_storage_matches(

summary_data = ensemble.load_responses(
"summary",
tuple(ensemble.get_realization_list_with_responses("summary")),
tuple(ensemble.get_realization_list_with_responses()),
)
snapshot.assert_match(
summary_data.sort("time", "response_key", "realization")
Expand Down

0 comments on commit 25ac827

Please sign in to comment.