Skip to content

Commit

Permalink
fix some coding style issues
Browse files Browse the repository at this point in the history
  • Loading branch information
pvstorageoptimization committed Sep 25, 2024
1 parent 4a30de0 commit aec5728
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions optibess_algorithm/output_calculator.py
Original file line number Diff line number Diff line change
Expand Up @@ -1152,7 +1152,7 @@ def sell_prices(self):
return self._sell_prices

@sell_prices.setter
def sell_prices(self, value: np.ndarray[Any, float]):
def sell_prices(self, value: np.ndarray[Any, np.dtype[np.float64]]):
if isinstance(value, np.ndarray) and is_real_numbers(value):
if value.shape != (YEAR_HOURS,) and value.shape != (self._project_hour_num,):
raise ValueError(f"Prices shape should be ({YEAR_HOURS},) or ({self._project_hour_num}, ), prices"
Expand All @@ -1172,7 +1172,7 @@ def buy_prices(self):
return self._buy_prices

@buy_prices.setter
def buy_prices(self, value: np.ndarray[Any, float]):
def buy_prices(self, value: np.ndarray[Any, np.dtype[np.float64]]):
if isinstance(value, np.ndarray) and is_real_numbers(value):
if value.shape != (YEAR_HOURS,) and value.shape != (self._project_hour_num, ):
raise ValueError(f"Prices shape should be ({YEAR_HOURS},) or ({self._project_hour_num}, ), prices"
Expand Down Expand Up @@ -1200,7 +1200,7 @@ def tariff_table(self, value: np.ndarray[Any, np.dtype[np.float64]]):
raise ValueError("Tariff table should be of shape (7, 12, 24)")
self._tariff_table = value

def _get_action_from_obs(self, obs: np.ndarray[Any, float]):
def _get_action_from_obs(self, obs: np.ndarray[Any, np.dtype[np.float64]]):
"""
get action(s) from model given an observation
Expand Down
2 changes: 1 addition & 1 deletion optibess_algorithm/producers.py
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ def annual_deg(self, value):
def start_year(self):
return self._start_year

def _set_start_year(self, value: int):
def _set_start_year(self, value):
if value is None:
self._start_year = datetime.datetime.today().year
else:
Expand Down

0 comments on commit aec5728

Please sign in to comment.