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

Water depth for Capytaine #4

Open
mancellin opened this issue Jul 20, 2023 · 3 comments
Open

Water depth for Capytaine #4

mancellin opened this issue Jul 20, 2023 · 3 comments

Comments

@mancellin
Copy link

I'm not sure 0 is a good default value for the water depth in Capytaine.

I don't mind using the "negative = infinity" convention used in other solver, but given the line

waterdepth = float(self.ui.teWaterdepth.text())

then entering infinity or inf would give float('inf') which is the actual floating point representation of infinity.

@RubendeBruin
Copy link
Owner

Good point,
update to:
image

if the checkbox is checked then "None" is passed as waterdepth

@mancellin
Copy link
Author

The UI looks good!
Capytaine might interpret water_depth=None as infinite depth, but for robustness and future-proof-ness I would suggest using in your code the explicit standard floating point number representation of infinity water_depth=float('infinity').

@RubendeBruin
Copy link
Owner

Done,

image

in current master branch. Will be in next compiled version

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

No branches or pull requests

2 participants