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

[Fix] Fix typehint in _scale_size and rescale_size #2799

Merged
merged 1 commit into from
May 22, 2023

Conversation

MambaWong
Copy link
Contributor

No description provided.

@CLAassistant
Copy link

CLAassistant commented May 18, 2023

CLA assistant check
All committers have signed the CLA.

@@ -27,7 +27,7 @@ def _scale_size(
Returns:
tuple[int]: scaled size.
"""
if isinstance(scale, (float, int)):
if isinstance(scale, float):
Copy link
Collaborator

Choose a reason for hiding this comment

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

Hi @MambaWong , scale should support accepting int type so we only need to update the docstring.

Copy link
Contributor Author

@MambaWong MambaWong May 18, 2023

Choose a reason for hiding this comment

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

Hi @zhouzaida, I'm confused about the need for int, can you give some example?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Hi, this is just for the convenience of the user, for example, if you want to double the size of the image, you can pass in 2, but of course, you can also pass in 2.0.

@zhouzaida zhouzaida merged commit 3269278 into open-mmlab:main May 22, 2023
@MambaWong MambaWong deleted the typehint branch May 22, 2023 03:19
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.

3 participants