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

Specify otypes to fix zero-sized calls #1433

Merged
merged 3 commits into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from 2 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
2 changes: 1 addition & 1 deletion pyaerocom/io/pyaro/read_pyaro.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ def _calculate_ts_type(
) -> npt.NDArray[TsType]:
seconds = (end - start).astype("timedelta64[s]").astype(np.int32)

@np.vectorize
@np.vectorize(otypes=[TsType])
@functools.lru_cache(maxsize=128)
def memoized_ts_type(x: np.int32) -> TsType:
if x == 0:
Expand Down
4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ dependencies = [
"matplotlib>=3.7.1",
"scipy>=1.10.1",
"pandas>=1.5.3",
"numpy>=1.24.4",
"numpy>=1.25.0",
magnusuMET marked this conversation as resolved.
Show resolved Hide resolved
"seaborn>=0.12.2",
"dask",
"geonum==1.5.0",
Expand Down Expand Up @@ -219,7 +219,7 @@ deps =
cartopy ==0.21.1; python_version < "3.11"
matplotlib ==3.7.1; python_version < "3.11"
scipy ==1.10.1; python_version < "3.11"
numpy ==1.24.4; python_version < "3.11"
numpy ==1.25.0; python_version < "3.11"
seaborn ==0.12.2; python_version < "3.11"
geonum ==1.5.0; python_version < "3.11"
typer ==0.7.0; python_version < "3.11"
Expand Down
Loading