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 TypeError: Tuple error #248

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

besarismaili
Copy link

@besarismaili besarismaili commented Oct 28, 2023

The error occurs when the F.interpolate function was called with new_height and new_width as arguments for the size parameter. These variables were of type numpy.intc, while F.interpolate expected arguments of type int or Tuple[int] or Tuple[int, int] or Tuple[int, int, #int].

The fix involves converting new_height and new_width to Python's native int type before they are passed to F.interpolate. This ensures that the function receives arguments of the correct type, preventing the TypeError. #246

The error was occurring when the F.interpolate function was called with new_height and new_width as arguments for the size parameter. These variables were of type numpy.intc, while F.interpolate expected arguments of type int or Tuple[int] or Tuple[int, int] or Tuple[int, int, int].

The fix involves converting new_height and new_width to Python's native int type before they are passed to F.interpolate. This ensures that the function receives arguments of the correct type, preventing the TypeError.
garywang added a commit to PolyCam/MiDaS that referenced this pull request Dec 13, 2023
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.

1 participant