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

Fix value trying to be set on a copy of a slice from a DataFrame from tests #114

Closed
brews opened this issue Jul 20, 2023 · 0 comments · Fixed by #116
Closed

Fix value trying to be set on a copy of a slice from a DataFrame from tests #114

brews opened this issue Jul 20, 2023 · 0 comments · Fixed by #116
Labels
bug Something isn't working

Comments

@brews
Copy link
Member

brews commented Jul 20, 2023

From a warning at the bottom of the running tests.

tests/test_rff.py::test_process_rff_sample
  /opt/hostedtoolcache/Python/3.10.12/x64/lib/python3.10/site-packages/dscim/utils/rff.py:211: SettingWithCopyWarning: 
  A value is trying to be set on a copy of a slice from a DataFrame
  
  See the caveats in the documentation: https://pandas.pydata.org/pandas-docs/stable/user_guide/indexing.html#returning-a-view-versus-a-copy
    rff_df.weight[np.isnan(rff_df.weight)] = np.exp(

Prob want this so code isn't setting a value on a copy of a slice from a DataFrame, if this is the case.

@brews brews added the bug Something isn't working label Jul 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant