-
Notifications
You must be signed in to change notification settings - Fork 0
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
Dev #46
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #46 +/- ##
==========================================
+ Coverage 78.42% 78.54% +0.12%
==========================================
Files 17 17
Lines 1233 1240 +7
Branches 268 269 +1
==========================================
+ Hits 967 974 +7
Misses 253 253
Partials 13 13 ☔ View full report in Codecov by Sentry. |
imops/crop.py
Outdated
shape = np.asarray(shape) | ||
if not np.issubdtype(shape.dtype, np.integer): | ||
raise ValueError(f'`shape` must be of integer dtype, got {shape.dtype}') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mb move this to a function? we're using this logic in several places anyway
imops/interp1d.py
Outdated
@@ -137,7 +137,9 @@ def __init__( | |||
njit_kwargs = {kwarg: getattr(backend, kwarg) for kwarg in backend.__dataclass_fields__.keys()} | |||
self.src_interp1d = njit(**njit_kwargs)(numba_interp1d) | |||
|
|||
def __call__(self, x_new: np.ndarray) -> np.ndarray: | |||
def __call__(self, x_new: np.ndarray, use_torch: bool = False) -> np.ndarray: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
use_torch
is too hacky. m.b. this should be specified through the backend?
No description provided.