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

Vectorize dc and dmc #3764

Merged
merged 1 commit into from
Jul 5, 2024
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
6 changes: 4 additions & 2 deletions api/app/auto_spatial_advisory/sfms.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
from cffdrs import bui
from cffdrs import bui, dc, dmc
from numba import vectorize

vectorized_bui = vectorize(bui)
vectorized_bui = vectorize(bui)
vectorized_dc = vectorize(dc)
vectorized_dmc = vectorize(dmc)
1,819 changes: 1,819 additions & 0 deletions api/app/tests/sfms/test_sfms_dc_vectorized.py

Large diffs are not rendered by default.

1,819 changes: 1,819 additions & 0 deletions api/app/tests/sfms/test_sfms_dmc_vectorized.py

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions api/app/tests/utils/numpy_utils.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import numpy as np


def create_numpy_array(value) -> np.ndarray:
return np.array([[value, value, value], [value, value, value], [value, value, value]])
18 changes: 14 additions & 4 deletions api/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions api/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ httpx = "^0.27.0"
orjson = "^3.9.0"
greenlet = "^3.0.0"
sentry-sdk = {extras = ["fastapi"], version = "^2.0.1"}
cffdrs = {version = "^0.1.0", source = "psu"}
numba = "^0.59.1"
cffdrs = {version = "^0.1.1", source = "psu"}

[tool.poetry.group.dev.dependencies]
pytest = "^7.2.1"
Expand Down Expand Up @@ -103,4 +103,5 @@ per-file-ignores = { "alembic/versions/00df3c7b5cba_rethink_classification.py" =
"F811",
] }
line-length = 185
ignore = ["E712"]
ignore = ["E712", "F401"]

Loading