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

[BUG] Fix various PendingDeprecationWarning and FutureWarning #97

Open
talgalili opened this issue Jan 3, 2025 · 0 comments
Open

[BUG] Fix various PendingDeprecationWarning and FutureWarning #97

talgalili opened this issue Jan 3, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@talgalili
Copy link
Contributor

The list to fix (based on github flow)

=============================== warnings summary ===============================
tests/test_cli.py: 110 warnings
  /home/runner/work/balance/balance/balance/weighting_methods/ipw.py:278: RuntimeWarning:
  
  invalid value encountered in scalar divide

tests/test_cli.py::TestCli::test_cli_sep_input_works
  /home/runner/work/balance/balance/tests/test_cli.py:433: FutureWarning:
  
  Calling int on a single element Series is deprecated and will raise a TypeError in the future. Use int(ser.iloc[0]) instead

tests/test_cli.py::TestCli::test_cli_sep_works
  /home/runner/work/balance/balance/tests/test_cli.py:363: FutureWarning:
  
  Calling int on a single element Series is deprecated and will raise a TypeError in the future. Use int(ser.iloc[0]) instead

tests/test_cli.py::TestCli::test_cli_short_arg_names_works
  /home/runner/work/balance/balance/tests/test_cli.py:504: FutureWarning:
  
  Calling int on a single element Series is deprecated and will raise a TypeError in the future. Use int(ser.iloc[0]) instead

tests/test_sample.py::TestSample_metrics_methods::test_Sample_keep_only_some_rows_columns
  /home/runner/work/balance/balance/tests/test_sample.py:877: FutureWarning:
  
  Calling int on a single element Series is deprecated and will raise a TypeError in the future. Use int(ser.iloc[0]) instead

tests/test_sample.py::TestSample_metrics_methods::test_Sample_keep_only_some_rows_columns
  /home/runner/work/balance/balance/tests/test_sample.py:878: FutureWarning:
  
  Calling int on a single element Series is deprecated and will raise a TypeError in the future. Use int(ser.iloc[0]) instead

tests/test_sample.py::TestSample_metrics_methods::test_Sample_keep_only_some_rows_columns
  /home/runner/work/balance/balance/tests/test_sample.py:880: FutureWarning:
  
  Calling int on a single element Series is deprecated and will raise a TypeError in the future. Use int(ser.iloc[0]) instead

tests/test_sample.py::TestSample_metrics_methods::test_Sample_keep_only_some_rows_columns
  /home/runner/work/balance/balance/tests/test_sample.py:886: FutureWarning:
  
  Calling int on a single element Series is deprecated and will raise a TypeError in the future. Use int(ser.iloc[0]) instead

tests/test_sample.py::TestSample_metrics_methods::test_Sample_keep_only_some_rows_columns
  /home/runner/work/balance/balance/tests/test_sample.py:890: FutureWarning:
  
  Calling int on a single element Series is deprecated and will raise a TypeError in the future. Use int(ser.iloc[0]) instead

tests/test_sample.py::TestSample_metrics_methods::test_Sample_keep_only_some_rows_columns
  /home/runner/work/balance/balance/tests/test_sample.py:893: FutureWarning:
  
  Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead

tests/test_stats_and_plots.py::TestBalance_weighted_stats::test__prepare_weighted_stat_args
  /home/runner/work/balance/balance/tests/test_stats_and_plots.py:160: PendingDeprecationWarning:
  
  the matrix subclass is not the recommended way to represent matrices or deal with linear algebra (see https://docs.scipy.org/doc/numpy/user/numpy-for-matlab-users.html). Please adjust your code to use regular ndarray.

tests/test_stats_and_plots.py::TestBalance_weighted_stats::test__prepare_weighted_stat_args
  /home/runner/work/balance/balance/tests/test_stats_and_plots.py:189: PendingDeprecationWarning:
  
  the matrix subclass is not the recommended way to represent matrices or deal with linear algebra (see https://docs.scipy.org/doc/numpy/user/numpy-for-matlab-users.html). Please adjust your code to use regular ndarray.

tests/test_stats_and_plots.py::TestBalance_weighted_stats::test_weighted_mean
  /home/runner/work/balance/balance/tests/test_stats_and_plots.py:286: PendingDeprecationWarning:
  
  the matrix subclass is not the recommended way to represent matrices or deal with linear algebra (see https://docs.scipy.org/doc/numpy/user/numpy-for-matlab-users.html). Please adjust your code to use regular ndarray.

tests/test_stats_and_plots.py::TestBalance_weighted_stats::test_weighted_quantile
  /home/runner/work/balance/balance/tests/test_stats_and_plots.py:[443](https://github.com/facebookresearch/balance/actions/runs/12593610597/job/35099888317?pr=96#step:5:444): PendingDeprecationWarning:
  
  the matrix subclass is not the recommended way to represent matrices or deal with linear algebra (see https://docs.scipy.org/doc/numpy/user/numpy-for-matlab-users.html). Please adjust your code to use regular ndarray.

tests/test_stats_and_plots.py::TestBalance_weighted_stats::test_weighted_quantile
  /home/runner/work/balance/balance/tests/test_stats_and_plots.py:451: PendingDeprecationWarning:
  
  the matrix subclass is not the recommended way to represent matrices or deal with linear algebra (see https://docs.scipy.org/doc/numpy/user/numpy-for-matlab-users.html). Please adjust your code to use regular ndarray.

tests/test_stats_and_plots.py::TestBalance_weighted_stats::test_weighted_quantile
  /home/runner/work/balance/balance/tests/test_stats_and_plots.py:459: PendingDeprecationWarning:
  
  the matrix subclass is not the recommended way to represent matrices or deal with linear algebra (see https://docs.scipy.org/doc/numpy/user/numpy-for-matlab-users.html). Please adjust your code to use regular ndarray.

tests/test_weighted_comparisons_plots.py::Test_weighted_comparisons_plots::test_plot_dist
  /home/runner/work/balance/balance/tests/test_weighted_comparisons_plots.py:275: DeprecationWarning:
  
  This function is deprecated. Please call randint(11111, 11114 + 1) instead

-- Docs: https://docs.pytest.org/en/stable/how-to/capture-warnings.html
@talgalili talgalili added the bug Something isn't working label Jan 3, 2025
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

No branches or pull requests

1 participant