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

Convert discrete intervals between closed and open forms #69

Closed
smcc-rai opened this issue Nov 16, 2021 · 1 comment
Closed

Convert discrete intervals between closed and open forms #69

smcc-rai opened this issue Nov 16, 2021 · 1 comment

Comments

@smcc-rai
Copy link

Hi, I'm finding this library very convenient. Thank you for sharing it.

I noted that in answering #24 you discussed "extend" (convert to open) and "reduce" (convert to closed) operations on discrete intervals. I think it would be nice to include those operations in the library as utility functions.

I have a few use cases in mind:

  1. Normalizing to either closed or open form before passing the interval's endpoints into an external query (e.g. SQL/pandas/etc.)
  2. To convert to left-closed/right-open form, which is conventional for python/numpy sequence slicing.
@AlexandreDecan
Copy link
Owner

Hi,

I understand the use-cases and the interest of having access to these functions. However, I don't think to integrate them in the library, because it's quite "specific". On the other hand, I think it could be interesting to have, in the documentation or within an "unofficial" module, a list of "recipes" that could be useful as a complement to portion.

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