Skip to content

Commit 82ba79e

Browse files
committed
Major upgrade of numpy dependency to v2
Also relaxed floating point requirements to avoid type checking errors. Signed-off-by: cwasicki <[email protected]>
1 parent e43637d commit 82ba79e

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

RELEASE_NOTES.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66

77
## Upgrading
88

9+
10+
* Includes a major dependency upgrade of the numpy library to version 2.
11+
912
<!-- Here goes notes on how to upgrade from previous versions, including deprecations and what they should be replaced with -->
1013

1114
## New Features

pyproject.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@ classifiers = [
2727
requires-python = ">= 3.11, < 4"
2828
dependencies = [
2929
"typing-extensions >= 4.12.2, < 5",
30-
"numpy >= 1.26.4, < 1.27.0",
31-
"pandas >= 2.1.4, < 2.3.0",
30+
"numpy >= 2.0, < 3",
31+
"pandas >= 2.2.2, < 3",
3232
"matplotlib >= 3.8.4, < 3.11.0",
3333
"ipython == 9.2.0",
3434
"pvlib >= 0.11.0, < 0.12.0",
@@ -37,7 +37,7 @@ dependencies = [
3737
"plotly >= 6.0.0, < 6.1.0",
3838
"kaleido >= 0.2.1, < 0.3.0",
3939
"frequenz-client-reporting >= 0.16.0, < 0.17.0",
40-
"frequenz-client-weather >= 0.1.0, < 0.2.0",
40+
"frequenz-client-weather >= 0.2.0, < 0.3.0",
4141
]
4242
dynamic = ["version"]
4343

src/frequenz/lib/notebooks/solar/maintenance/models.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ def prepare_prediction_models(
9595
"""
9696
data_copy = data.copy()
9797

98-
supported_models: dict[str, Callable[..., SeriesFloat | NDArray[np.float64]]] = {
98+
supported_models: dict[str, Callable[..., SeriesFloat | NDArray[np.floating]]] = {
9999
"wma": weighted_moving_average,
100100
"sampled_ma": sampled_moving_average,
101101
"naive_eff_irr2power": naive_efficiency_factor_irr_to_power,
@@ -158,7 +158,7 @@ def weighted_moving_average(
158158
mode: str | None = None,
159159
win_size: int | None = None,
160160
weights: NDArray[np.float64] | None = None,
161-
) -> NDArray[np.float64]:
161+
) -> NDArray[np.floating]:
162162
"""Perform moving average with different weighting schemes.
163163
164164
Args:

0 commit comments

Comments
 (0)