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

Use is_floating_point() to check for float image #3239

Merged
merged 4 commits into from
Jan 20, 2021

Conversation

datumbox
Copy link
Contributor

Tiny refactoring to use directly is_floating_point() to check if the tensor is of floating type. Unclear whether there was a specific reason why we did the check this way and what is the preferred idiom.

This came up on another PR #3238, so it's worth clarifying.

@codecov
Copy link

codecov bot commented Jan 13, 2021

Codecov Report

Merging #3239 (a414ed6) into master (d0063f3) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #3239   +/-   ##
=======================================
  Coverage   73.45%   73.45%           
=======================================
  Files         102      102           
  Lines        9329     9329           
  Branches     1494     1494           
=======================================
  Hits         6853     6853           
  Misses       2012     2012           
  Partials      464      464           
Impacted Files Coverage Δ
torchvision/transforms/functional_tensor.py 79.04% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d0063f3...a414ed6. Read the comment docs.

Copy link
Member

@fmassa fmassa left a comment

Choose a reason for hiding this comment

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

Thanks!

@fmassa fmassa merged commit da61ff8 into pytorch:master Jan 20, 2021
@datumbox datumbox deleted the refactor/is_floating_point branch January 20, 2021 16:48
facebook-github-bot pushed a commit that referenced this pull request Feb 1, 2021
Summary: Co-authored-by: Francisco Massa <fvsmassa@gmail.com>

Reviewed By: datumbox

Differential Revision: D26156388

fbshipit-source-id: aa09fdf088ab2271da5ae25d764262d6246e4599
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants