diff --git a/aeolis/model.py b/aeolis/model.py index a9dd402d..8c5a0bf8 100644 --- a/aeolis/model.py +++ b/aeolis/model.py @@ -61,7 +61,6 @@ # type hints from typing import Any, Union, Tuple -from numpy import ndarray from aeolis.utils import * @@ -388,7 +387,7 @@ def get_start_time(self) -> float: return self.p['tstart'] - def get_var(self, var:str) -> Union[ndarray, int, float, str, list]: + def get_var(self, var:str) -> Union[np.ndarray, int, float, str, list]: '''Returns spatial grid or model configuration parameter If the given variable name matches with a spatial grid, the @@ -524,7 +523,7 @@ def inq_compound_field(self) -> None: logger.log_and_raise('Method not yet implemented [inq_compound_field]', exc=NotImplementedError) - def set_var(self, var:str, val:Union[ndarray, int, float, str, list]) -> None: + def set_var(self, var:str, val:Union[np.ndarray, int, float, str, list]) -> None: '''Sets spatial grid or model configuration parameter If the given variable name matches with a spatial grid, the @@ -558,7 +557,7 @@ def set_var(self, var:str, val:Union[ndarray, int, float, str, list]) -> None: self.p[var] = val - def set_var_index(self, i:int, val:ndarray) -> None: + def set_var_index(self, i:int, val:np.ndarray) -> None: '''Set spatial grid by index (in alphabetical order) Parameters @@ -2556,7 +2555,7 @@ def set_params(self, **kwargs) -> None: self.p.update(kwargs) - def get_statistic(self, var:str, stat:str='avg') -> Union[ndarray, None]: + def get_statistic(self, var:str, stat:str='avg') -> Union[np.ndarray, None]: '''Return statistic of spatial grid Parameters @@ -2588,7 +2587,7 @@ def get_statistic(self, var:str, stat:str='avg') -> Union[ndarray, None]: return None - def get_var(self, var:str, clear:bool=True) -> Union[ndarray, int, float, str, list]: + def get_var(self, var:str, clear:bool=True) -> Union[np.ndarray, int, float, str, list]: '''Returns spatial grid, statistic or model configuration parameter Overloads the :func:`~model.AeoLiS.get_var()` function and @@ -3098,7 +3097,7 @@ def __init__(self, self.MTMcum = np.cumsum(MTM,1) - def __getitem__(self, s:int)-> ndarray: + def __getitem__(self, s:int)-> np.ndarray: """ Retrieves item from list of wind speeds as an array