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

Single utility function to return array from tensor/image #483

Merged

Conversation

sarthakpati
Copy link
Collaborator

Fixes #N.A.

Proposed Changes

  • added a helper function to return numpy array from torch.Tensor or sitk.Image
  • reduces amount of code

Checklist

  • I have read the CONTRIBUTING guide
  • My PR is based from the current GaNDLF master
  • Non-breaking change (does not break existing functionality): provide as many details as possible for any breaking change
  • Function/class source code documentation added/updated
  • Code has been blacked for style consistency
  • If applicable, version information has been updated in GANDLF/version.py
  • If adding a git submodule, add to list of exceptions for black styling in pyproject.toml file
  • Usage documentation has been updated, if appropriate
  • History has been updated, if appropriate
  • Tests added or modified to cover the changes; if coverage is reduced, please give explanation
  • If customized dependency installation is required (i.e., a separate pip install step is needed for PR to be functional), please ensure it is reflected in all the files that control the CI, namely: python-test.yml, and all docker files [1,2,3,4]

@codecov
Copy link

codecov bot commented Sep 2, 2022

Codecov Report

Merging #483 (2f12dd3) into master (5030ff8) will increase coverage by 0.03%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##           master     #483      +/-   ##
==========================================
+ Coverage   92.42%   92.46%   +0.03%     
==========================================
  Files         105      105              
  Lines        6433     6451      +18     
==========================================
+ Hits         5946     5965      +19     
+ Misses        487      486       -1     
Flag Coverage Δ
unittests 92.46% <100.00%> (+0.03%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
GANDLF/utils/__init__.py 100.00% <ø> (ø)
GANDLF/data/post_process/morphology.py 96.15% <100.00%> (-0.52%) ⬇️
GANDLF/utils/generic.py 92.53% <100.00%> (+1.30%) ⬆️
GANDLF/utils/tensor.py 88.27% <100.00%> (-0.08%) ⬇️
testing/test_full.py 98.05% <100.00%> (+0.02%) ⬆️
...NDLF/data/preprocessing/template_matching/utils.py 97.67% <0.00%> (+2.32%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@sarthakpati sarthakpati marked this pull request as draft September 4, 2022 18:36
@sarthakpati sarthakpati marked this pull request as ready for review September 4, 2022 18:37
@Geeks-Sid Geeks-Sid merged commit 2f12dd3 into mlcommons:master Sep 4, 2022
@sarthakpati sarthakpati deleted the single_function_to_return_array branch September 5, 2022 02:34
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.

None yet

2 participants