Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Numpy v2 compatibility #75

Closed
wants to merge 3 commits into from
Closed
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: 6 additions & 6 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ci:

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: "v4.5.0"
rev: "v4.6.0"
hooks:
- id: check-added-large-files
- id: check-case-conflict
Expand Down Expand Up @@ -34,18 +34,18 @@ repos:
- id: isort

- repo: https://github.com/asottile/pyupgrade
rev: "v3.15.2"
rev: "v3.16.0"
hooks:
- id: pyupgrade
args: ["--py38-plus"]

- repo: https://github.com/psf/black
rev: "24.3.0"
rev: "24.4.2"
hooks:
- id: black-jupyter

- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v1.9.0"
rev: "v1.10.1"
hooks:
- id: mypy
files: src
Expand All @@ -58,7 +58,7 @@ repos:
args: ["--all"]

- repo: https://github.com/PyCQA/flake8
rev: "7.0.0"
rev: "7.1.0"
hooks:
- id: flake8
additional_dependencies: [
Expand All @@ -81,7 +81,7 @@ repos:
stages: [manual]

- repo: https://github.com/codespell-project/codespell
rev: "v2.2.6"
rev: "v2.3.0"
hooks:
- id: codespell
args: ["-L", "nd,unparseable,compiletime"]
Expand Down
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ install_requires =
matplotlib
numba!=0.53.*,!=0.54.*
parse
pint
pint!=0.24
pyarrow
scipy
tqdm>=4.27
Expand Down
2 changes: 1 addition & 1 deletion src/dspeed/processors/gaussian_filter1d.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@

# All this code belongs to the team that coded Scipy, found at this link:
# https://github.com/scipy/scipy/blob/v1.6.0/scipy/ndimage/filters.py#L210-L260
# The only thing changed was the calculation of the convulution, which
# The only thing changed was the calculation of the convolution, which
# originally called a function from a C library. In this code, the convolution is
# performed with NumPy's built in convolution function.
from __future__ import annotations
Expand Down
8 changes: 4 additions & 4 deletions src/dspeed/processors/get_multi_local_extrema.py
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,10 @@ def get_multi_local_extrema(
n_min_right_counter = 0

# initialize temporary arrays
left_vt_max = np.zeros(len(vt_max_out), dtype=np.float_)
left_vt_min = np.zeros(len(vt_min_out), dtype=np.float_)
right_vt_max = np.zeros(len(vt_max_out), dtype=np.float_)
right_vt_min = np.zeros(len(vt_min_out), dtype=np.float_)
left_vt_max = np.zeros(len(vt_max_out), dtype=float)
left_vt_min = np.zeros(len(vt_min_out), dtype=float)
right_vt_max = np.zeros(len(vt_max_out), dtype=float)
right_vt_min = np.zeros(len(vt_min_out), dtype=float)

left_vt_max[:] = np.nan
left_vt_min[:] = np.nan
Expand Down
Loading