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

Minor fix in objects dimensions #26

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

nataliakoliou
Copy link
Contributor

We've refined the make_square and make_long functions to address a potential issue where generated shapes could exceed the specified max_dim limit along the x or y axis.

  1. In the make_square function, we've adjusted the calculation of the upper limit (lim) for the random delta to ensure that the generated square stays within the specified max_dim along either the x or y axis.

  2. Similarly in the make_long function, we've adjusted the calculation of lim_x2 and lim_y2 to prevent the generated long shape from exceeding the specified max_dim along either the x or y axis.

Closes #23

@stasinos
Copy link
Owner

stasinos commented Feb 6, 2024

Thank you for the fix @nataliakoliou
I have one question: If the ValueError is now not raised, why did you not remove the try in make_production_dataset() ?

@nataliakoliou
Copy link
Contributor Author

Sorry for the oversight! Thank you @stasinos for pointing that out. I have removed the try-except block it in the updated code.

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.

Error when making square/long objects
2 participants