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

range protection, step not 0 protection, Exception handling with linear bins #47

Merged
merged 1 commit into from
Jan 11, 2025

Conversation

LTDakin
Copy link
Contributor

@LTDakin LTDakin commented Jan 10, 2025

Adds three protections when creating bins

  • if the range are equal numbers it will just return one bin with the number
  • steps are enforced to be a minimum of 1 since arange requires ints and avoids a division by 0 error
  • Exceptions are logged with values and falls back to creating a linear array of bins from the zero to max

@LTDakin LTDakin self-assigned this Jan 10, 2025
Copy link
Contributor

@jnation3406 jnation3406 left a comment

Choose a reason for hiding this comment

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

Looks good to me

@LTDakin LTDakin merged commit 138145c into main Jan 11, 2025
3 checks passed
@LTDakin LTDakin deleted the fix/zero-division-error branch January 11, 2025 01:42
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