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

[pre-commit.ci] pre-commit autoupdate #13

Merged
merged 2 commits into from
Aug 17, 2023
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
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ repos:
- id: trailing-whitespace

- repo: https://github.com/psf/black
rev: "23.3.0"
rev: "23.7.0"
hooks:
- id: black

- repo: https://github.com/PyCQA/flake8
rev: "6.0.0"
rev: "6.1.0"
hooks:
- id: flake8

Expand All @@ -34,12 +34,12 @@ repos:
- id: isort

- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v1.2.0"
rev: "v1.5.0"
hooks:
- id: mypy

- repo: https://github.com/hadialqattan/pycln
rev: "v2.1.3"
rev: "v2.2.2"
hooks:
- id: pycln

Expand Down
12 changes: 4 additions & 8 deletions src/tophu/multilook.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,20 +66,16 @@ def multilook(arr: da.Array, nlooks: IntOrInts) -> da.Array:
# Warn if the number of looks along any axis is even-valued.
if any(map(util.iseven, nlooks)):
warnings.warn(
(
"one or more components of nlooks is even-valued -- this will result in"
" a phase delay in the multilooked data equivalent to a half-bin shift"
),
"one or more components of nlooks is even-valued -- this will result in"
" a phase delay in the multilooked data equivalent to a half-bin shift",
RuntimeWarning,
)

# Warn if any array dimensions are not integer multiples of `nlooks`.
if any(m % n != 0 for (m, n) in zip(arr.shape, nlooks)):
warnings.warn(
(
"input array shape is not an integer multiple of nlooks -- remainder"
" samples will be excluded from output"
),
"input array shape is not an integer multiple of nlooks -- remainder"
" samples will be excluded from output",
RuntimeWarning,
)

Expand Down
Loading