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

deprecated DataFrame.ix in molecule.py (line 68) #283

Open
adamphil opened this issue Feb 8, 2024 · 2 comments
Open

deprecated DataFrame.ix in molecule.py (line 68) #283

adamphil opened this issue Feb 8, 2024 · 2 comments
Labels
Bug Usage is unexpected or incorrect Need more info More information is needed from OP

Comments

@adamphil
Copy link
Member

adamphil commented Feb 8, 2024

Old .ix method needs to be replaced with .loc or .iloc

@herbertludowieg
Copy link
Member

Hey, thank you for highlighting this!! I checked the logs for the unit test coverage and found no unit testing/coverage on that file. I'm not sure if this should use .loc or .iloc. This is the line in question

self.ix[self.index.isin(this.index), 'classification'] = classification

It seems to be using a boolean array for indexing the rows. If that's the case, I think we can replace it with .loc.

Do you have a minimal working example that I could look at to reproduce the issue?

Do you think you can make the necessary changes and set up some unit testing for that file?

@herbertludowieg herbertludowieg added Bug Usage is unexpected or incorrect Need more info More information is needed from OP labels Feb 9, 2024
@adamphil
Copy link
Member Author

adamphil commented Feb 9, 2024

replacement with .loc eliminates the error. Unfortunately, I can't commit to further debugging or testing for this. To reproduce you can define a universe object that contains water molecules, and try u.molecule.classify(('H(2)O(1)','water',True))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Usage is unexpected or incorrect Need more info More information is needed from OP
Projects
None yet
Development

No branches or pull requests

2 participants