Skip to content

Check x bounds before calculating i0 (similar to what is done for Eeq)#19

Merged
c-randall merged 5 commits intomainfrom
boundcheck
Jun 10, 2025
Merged

Check x bounds before calculating i0 (similar to what is done for Eeq)#19
c-randall merged 5 commits intomainfrom
boundcheck

Conversation

@malihass
Copy link
Collaborator

@malihass malihass commented Jun 3, 2025

Description

Check for bounds of intercalation fraction to avoid doing a square root of a negative number
At times I get a Runtime warning about this. And it might be more appropriate to fail with a Value Error.

Type of change

Please add a line in the relevant section of CHANGELOG.md to document the change (include PR #) - note reverse order of PR #s. If necessary, also add to the list of breaking changes.

  • New feature (non-breaking change which adds functionality)
  • Optimization (back-end change that improves speed/readability/etc.)
  • Bug fix (non-breaking change which fixes an issue)

Key checklist:

  • No style issues: $ nox -s linter [-- format]
  • Code is free of misspellings: $ nox -s codespell [-- write]
  • All tests pass: $ nox -s tests
  • Badges are updated: $ nox -s badges

The optional -- format and -- write arguments (see above) attempt to correct formatting issues prior to running the linter, and spelling mistakes prior to running the spellcheck, respectively. You can also run all of the above checks using $ nox -s pre-commit instead of running them individually.

Further checks:

  • The documentation builds: $ nox -s docs.
  • Code is commented, particularly in hard-to-understand areas.
  • Tests are added that prove fix is effective or that feature works.

@malihass malihass requested a review from c-randall June 3, 2025 18:14
@c-randall c-randall merged commit 306121a into main Jun 10, 2025
18 checks passed
@c-randall c-randall deleted the boundcheck branch June 10, 2025 21:27
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.

2 participants

Comments