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

Gini and Theil classes as top-level in namespace? #38

Open
jGaboardi opened this issue Nov 30, 2022 · 4 comments
Open

Gini and Theil classes as top-level in namespace? #38

jGaboardi opened this issue Nov 30, 2022 · 4 comments
Assignees
Labels

Comments

@jGaboardi
Copy link
Member

We are currently populating the top-level namespace with access to the Gini & Theil classes as inequality.gini.Gini, for example. I would like to propose adding the classes themselves to the top-level namespace, e.g.:

from .gini import Gini

This would help distinguishing between the class offering of Gini & Theil and the functional indices in _indices.

xref #31

@jGaboardi jGaboardi added the api label Nov 30, 2022
@jGaboardi jGaboardi self-assigned this Dec 1, 2022
@jGaboardi
Copy link
Member Author

Probably best to start with a FutureWarning that the namespace will change, even though only slightly.

@jGaboardi
Copy link
Member Author

@martinfleis Do you have any input on this since momepy is using both Gini and Theil?

@martinfleis
Copy link
Member

We have it as optional dependency with imports as from inequality.theil import Theil so I don't mind if I do that or from inequality import Theil

@martinfleis
Copy link
Member

If the merge with segregation will happen, I would follow whatever model is there.

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

No branches or pull requests

2 participants