Skip to content

Commit

Permalink
Merge pull request #44 from keurfonluu/devel
Browse files Browse the repository at this point in the history
Support Numpy v2
  • Loading branch information
keurfonluu authored Dec 19, 2024
2 parents 694013a + 18b7d02 commit 1a9e26d
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.6, 3.7, 3.8, 3.9]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v2
Expand All @@ -28,7 +28,7 @@ jobs:
pip install coverage
NUMBA_DISABLE_JIT=1 coverage run -m pytest
- name: Submit coverage
if: ${{ matrix.python-version == '3.8' }}
if: ${{ matrix.python-version == '3.12' }}
run: |
pip install codecov
codecov --token=${{ secrets.CODECOV_TOKEN }}
2 changes: 1 addition & 1 deletion disba/_cps/_surf96.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ def fast_delta(wvno, omega, d, alpha, beta, rho, llw):
mu0 = rho[0] * beta[0] ** 2.0
t0 = 2.0 - c2 / beta[0] ** 2.0

X = np.zeros(5, dtype=np.complex_)
X = np.zeros(5, dtype=np.complex128)
X[0] = 2.0 * t0
X[1] = -t0 * t0
X[4] = -4.0
Expand Down
6 changes: 3 additions & 3 deletions disba/_cps/_swegn96.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
@jitted
def evalg(m, d, a, b, rho, wvno, om):
"""Layered half space problem for Rayleigh-wave."""
gbr = np.zeros(5, dtype=np.complex_)
gbr = np.zeros(5, dtype=np.complex128)
wvno2 = wvno * wvno
om2 = om * om

Expand Down Expand Up @@ -181,7 +181,7 @@ def hska(
omega, wvno, b, rho, cosp, rsinp, sinpr, tcossv, trsinsv, tsinsvr, pex, svex, iwat
):
"""Thomson-Haskell's matrix for Rayleigh-wave."""
aa = np.zeros((4, 4), dtype=np.complex_)
aa = np.zeros((4, 4), dtype=np.complex128)
wvno2 = wvno * wvno
om2 = omega * omega

Expand Down Expand Up @@ -226,7 +226,7 @@ def hska(
@jitted
def dnka(omega, wvno, b, rho, cosp, rsinp, sinpr, cossv, rsinsv, sinsvr, ex, exa, iwat):
"""Dunkin's matrix for Rayleigh-wave."""
ca = np.zeros((5, 5), dtype=np.complex_)
ca = np.zeros((5, 5), dtype=np.complex128)
wvno2 = wvno * wvno
om2 = omega * omega

Expand Down
12 changes: 5 additions & 7 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[metadata]
name = disba
version = 0.6.1
version = 0.7.0
author = Keurfon Luu
email = keurfonluu@outlook.com
description = Numba-accelerated computation of surface wave dispersion
Expand All @@ -16,22 +16,20 @@ classifiers =
License :: OSI Approved :: BSD License
Operating System :: OS Independent
Development Status :: 4 - Beta
Programming Language :: Python :: 3.6
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
Programming Language :: Python :: 3.12

[options]
packages = find:
install_requires =
importlib_metadata
matplotlib
numpy
numba
python_requires = >= 3.6
setup_requires =
setuptools >= 42
wheel

[options.extras_require]
full =
matplotlib

0 comments on commit 1a9e26d

Please sign in to comment.