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

Removed dictionaries from LinearDiscretizer, added bincenter #25

Merged
merged 2 commits into from
Jan 31, 2020

Conversation

zsunberg
Copy link
Member

Changes discussed in #24 and #23

I decided to completely get rid of the dicts. Since D was already limited to be an Integer anyways, I think convert is actually the best way to support different key types. Moreover, if people want to use their own dicts/arrays on top of this to support mapping to some other type, that should not be too hard.

I also had to fix the lfactorial deprecation warning so that the tests would run in reasonable time.

Finally, there is one side effect of removing the dicts - if the user tries to decode an out-of-bounds key, a BoundsError is thrown instead of a KeyError. This seems ok to me.

This will directly affect some of the code I am using for my class, so I hope we can merge it ASAP. When it is done merging, can I add upper bounds to the dependency compats and tag and register v3.2.0?

@zsunberg zsunberg requested a review from tawheeler January 31, 2020 01:00
@mykelk
Copy link
Member

mykelk commented Jan 31, 2020

This looks good to me! @tawheeler ?

Copy link
Contributor

@tawheeler tawheeler left a comment

Choose a reason for hiding this comment

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

Looks great! Thanks for the improvement.

@zsunberg zsunberg merged commit 1a58ea1 into master Jan 31, 2020
@zsunberg zsunberg deleted the nodict branch January 31, 2020 18:44
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.

3 participants