Skip to content

Commit 23c8bc5

Browse files
committed
bump dependencies, support numpy >= 2.0
1 parent 1a53429 commit 23c8bc5

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

pyproject.toml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[build-system]
2-
requires = ["setuptools>=61"]
2+
requires = ["setuptools>=74"]
33
build-backend = "setuptools.build_meta"
44

55
[project]
@@ -29,13 +29,13 @@ classifiers = [
2929
]
3030
requires-python = ">=3.9"
3131
dependencies = [
32-
"loam>=0.8.0,<0.9.0",
32+
"loam~=0.8.0",
3333
"f90nml>=1.4.4",
34-
"numpy>=1.24,<2.0",
35-
"scipy>=1.10",
36-
"pandas>=2.0",
37-
"h5py>=3.10",
38-
"matplotlib>=3.7",
34+
"numpy~=2.0",
35+
"scipy~=1.13",
36+
"pandas~=2.2",
37+
"h5py~=3.11",
38+
"matplotlib~=3.9",
3939
]
4040

4141
[project.scripts]

stagpy/time_series.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
import matplotlib.pyplot as plt
88
import numpy as np
99
import pandas as pd
10+
from scipy.integrate import trapezoid
1011

1112
from . import _helpers
1213
from .config import Config
@@ -113,10 +114,10 @@ def compstat(
113114
for name in names:
114115
series = sdat.tseries.tslice(name, tstart, tend)
115116
delta_time = series.time[-1] - series.time[0]
116-
mean = np.trapz(series.values, x=series.time) / delta_time
117+
mean = trapezoid(series.values, x=series.time) / delta_time
117118
stats.loc["mean", name] = mean
118119
stats.loc["rms", name] = np.sqrt(
119-
np.trapz((series.values - mean) ** 2, x=series.time) / delta_time
120+
trapezoid((series.values - mean) ** 2, x=series.time) / delta_time
120121
)
121122
return stats
122123

0 commit comments

Comments
 (0)