Skip to content

Update math/resize #406

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

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from
Open

Update math/resize #406

wants to merge 8 commits into from

Conversation

mirjagranfors
Copy link
Collaborator

Updated docs of math/resize.

Made it compatible with torch, with a focus on getting the same results regardless if the input is a numpy array or a torch tensor.

Updated the unittesting, and included tests for torch

@mirjagranfors mirjagranfors requested review from JChonpca and Pwhsky July 30, 2025 12:17
@mirjagranfors mirjagranfors reopened this Aug 7, 2025
@mirjagranfors mirjagranfors marked this pull request as draft August 7, 2025 15:33
@mirjagranfors mirjagranfors marked this pull request as ready for review August 11, 2025 12:47
self.assertEqual(resized.shape, (4, 8))

### Test with PyTorch tensor (if available)
if TORCH_AVAILABLE:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The unit tests look good, I think we should separate the torch and numpy cases by putting them in either the TestMath_Numpy or TestMath_Torch classes, since they provide the BACKEND flag in the first line which makes it easily readable, like I did in PR #407

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