Skip to content

Commit d2a2aae

Browse files
authored
Merge pull request #54 from debpal/main
Improve Static Type Checks and Error Handling in TxtinoutReader
2 parents e986ce5 + 328b767 commit d2a2aae

4 files changed

Lines changed: 339 additions & 305 deletions

File tree

pySWATPlus/base_sensitivity_analyser.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ def _prepare_sobol_samples(
234234
var_names: list[str],
235235
var_bounds: list[list[float]],
236236
sample_number: int
237-
) -> tuple[dict[str, typing.Any], numpy.ndarray, numpy.ndarray, int]:
237+
) -> tuple[dict[str, typing.Any], numpy.typing.NDArray[numpy.float64], numpy.typing.NDArray[numpy.float64], int]:
238238
'''
239239
Prepare Sobol samples for sensitivity analysis.
240240
'''
@@ -261,7 +261,7 @@ def _prepare_sobol_samples(
261261

262262
@staticmethod
263263
def _collect_sobol_results(
264-
sample_array: numpy.ndarray,
264+
sample_array: numpy.typing.NDArray[numpy.float64],
265265
var_names: list[str],
266266
cpu_dict: dict[tuple[float, ...], dict[str, typing.Any]],
267267
problem_dict: dict[str, typing.Any],
@@ -326,7 +326,7 @@ def _collect_sobol_results(
326326
def _setup_simulation_directory(
327327
track_sim: int,
328328
num_sim: int,
329-
var_array: numpy.ndarray,
329+
var_array: numpy.typing.NDArray[numpy.float64],
330330
simulation_folder: pathlib.Path
331331
) -> tuple[pathlib.Path, dict[str, typing.Any]]:
332332
'''

0 commit comments

Comments
 (0)