- Drop support for Python 3.8. - Bump minimum dependencies to `numpy>=2.0` and `numba>=0.60`. - Replace legacy NumPy polynomial functions (polyder, polyadd, etc.) with the modern `numpy.polynomial.Polynomial` class for stable calculus and arithmetic operations. - Remove `_strip_leading_zeros` as the modern API handles degree alignment and zero-trimming natively. - Retain highest-to-lowest `self.coefficients` array to maintain compatibility with Numba and CUDA GPU kernels evaluating via Horner's method. - Fix `TypeError` in `quadratic_solve` by evaluating `b.real >= 0` to safely support complex coefficients. - Update `quadratic_solve` return type hint to `np.ndarray`.
33 lines
677 B
YAML
33 lines
677 B
YAML
name: Run Python Tests
|
|
on: pull_request
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: nvidia-cuda
|
|
strategy:
|
|
matrix:
|
|
python-version: ["3.10", "3.12", "3.14"]
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
- name: Check for GPU
|
|
run: |
|
|
echo "Checking for NVIDIA GPU..."
|
|
nvidia-smi
|
|
|
|
- name: Install dependencies with CUDA
|
|
run: |
|
|
python -m pip install --upgrade pip
|
|
pip install .[dev,cuda12]
|
|
|
|
- name: Run tests
|
|
run: |
|
|
pytest
|