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

Dev #46

Merged
merged 25 commits into from
Apr 24, 2024
Merged

Dev #46

merged 25 commits into from
Apr 24, 2024

Conversation

vovaf709
Copy link
Collaborator

No description provided.

Copy link

codecov bot commented Apr 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 78.54%. Comparing base (5212e88) to head (d9d38be).
Report is 2 commits behind head on master.

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.
📢 Have feedback on the report? Share it here.

imops/crop.py Outdated
Comment on lines 38 to 40
shape = np.asarray(shape)
if not np.issubdtype(shape.dtype, np.integer):
raise ValueError(f'`shape` must be of integer dtype, got {shape.dtype}')
Copy link
Member

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

@@ -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:
Copy link
Member

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?

@vovaf709 vovaf709 merged commit c95488c into master Apr 24, 2024
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants