Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11"]
python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]

steps:
- uses: actions/checkout@v4
Expand All @@ -25,7 +25,15 @@ jobs:
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e ".[dev]"
if [ "${{ matrix.python-version }}" == "3.10" ]; then
pip install -e ".[dev-min]"
else
pip install -e ".[dev]"
fi

- name: Show package versions
run: |
pip list

- name: Run tests
run: |
Expand Down
18 changes: 14 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,17 @@ authors = [
]
requires-python = ">=3.10"
dependencies = [
"numpy<1.24",
"scipy<1.14",
"numpy>=1.23.0",
"scipy>=1.9.0",
]
classifiers = [
"Development Status :: 4 - Beta",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Programming Language :: Python :: 3.13",
"Programming Language :: Python :: 3.14",
"License :: OSI Approved :: MIT License",
"Topic :: Scientific/Engineering",
]
Expand All @@ -39,8 +42,15 @@ include = ["rtdpy*"]

[project.optional-dependencies]
dev = [
"numpy==1.23.5",
"scipy==1.13.1",
"numpy==2.3.5",
"scipy==1.16.3",
"pytest>=7.0",
"pytest-cov>=4.0",
"ruff>=0.1.0",
]
dev-min = [
"numpy==1.23.0",
"scipy==1.9.0",
"pytest>=7.0",
"pytest-cov>=4.0",
"ruff>=0.1.0",
Expand Down
6 changes: 3 additions & 3 deletions rtdpy/convection.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,15 @@ def __init__(self, tau, dt, time_end):

def _calc_exitage(self):
"""Calculte exit age function."""
time_safe = np.clip(self.time, np.finfo(np.float).eps, None)
time_safe = np.clip(self.time, np.finfo(np.float64).eps, None)
output = self.tau**2 / (2 * time_safe**3)
mintime = self.tau / 2
output[self.time < mintime] = 0.
return output

def _calc_exitage_star(self):
"""Calculte exit age function."""
time_safe = np.clip(self.time, np.finfo(np.float).eps, None)
time_safe = np.clip(self.time, np.finfo(np.float64).eps, None)
output = self.tau / (2 * time_safe**2)
mintime = self.tau/2
output[self.time < mintime] = 0.
Expand All @@ -87,7 +87,7 @@ def exitage_star(self):

def _calc_exitage_star2(self):
"""Calculte exit age function."""
time_safe = np.clip(self.time, np.finfo(np.float).eps, None)
time_safe = np.clip(self.time, np.finfo(np.float64).eps, None)
output = 1. / (2 * time_safe)
mintime = self.tau/2
output[self.time < mintime] = 0.
Expand Down
6 changes: 3 additions & 3 deletions rtdpy/rtd.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"""Base RTD Class and Error."""
import numpy as np
from scipy.integrate import cumtrapz
from scipy.integrate import cumulative_trapezoid
from scipy.signal import convolve

from rtdpy.const import DTTOL
Expand Down Expand Up @@ -43,12 +43,12 @@ def exitage_norm(self):
@property
def stepresponse(self):
"""Step respose of RTD"""
return cumtrapz(self.exitage, self.time, initial=0)
return cumulative_trapezoid(self.exitage, self.time, initial=0)

@property
def stepresponse_norm(self):
"""Normalized step respose of RTD"""
return cumtrapz(self.exitage_norm, self.time, initial=0)
return cumulative_trapezoid(self.exitage_norm, self.time, initial=0)

@property
def dt(self):
Expand Down