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

What is ideal behavior for band lookups above max value? #38

Open
MatthewCaseres opened this issue Apr 11, 2024 · 1 comment
Open

What is ideal behavior for band lookups above max value? #38

MatthewCaseres opened this issue Apr 11, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@MatthewCaseres
Copy link
Collaborator

I think in the past you wanted to return np.nan but then it changed type of array.

Currently it throws an error.

I almost think we shouldn't even throw the error. If someone says 999999 surely they mean np.inf anyways?

What is the best possible behavior?

@MatthewCaseres MatthewCaseres added the enhancement New feature or request label Apr 11, 2024
@lewisfogden
Copy link
Owner

Some options:

  1. raise error if outside bounds
  2. automatically convert lower bound to -inf and upper bound to +inf so it covers real line.
  3. require users to manually include -inf and +inf with values
  4. Let users decide through the type suffix |band_inf etc

I quite like your suggestion i.e. (2), people generally want it to go to inf. (e.g. sum assured >£10m for certain reinsurance)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants