mne-tools / mne-nirs

Process Near-Infrared Spectroscopy Data in MNE
https://mne.tools/mne-nirs/
BSD 3-Clause "New" or "Revised" License
82 stars 35 forks source link

Fix Series.__getitem__ FutureWarning #514

Closed rob-luke closed 1 year ago

rob-luke commented 1 year ago

Fixes error...

________________________ test_statsmodel_to_df[mixedlm] ________________________
mne_nirs/statistics/tests/test_statsmodels.py:47: in test_statsmodel_to_df
    df = statsmodels_to_results(roi_model)
mne_nirs/statistics/_statsmodels.py:114: in statsmodels_to_results
    sdf[jj, 1] = np.sqrt(model.scale) * model.bse[model.k_fe + jj]
/opt/hostedtoolcache/Python/3.10.11/x64/lib/python3.10/site-packages/pandas/core/series.py:976: in __getitem__
    warnings.warn(
E   FutureWarning: Series.__getitem__ treating keys as positions is deprecated. In a future version, integer keys will always be treated as labels (consistent with DataFrame behavior). To access a value by position, use `ser.iloc[pos]`
codecov[bot] commented 1 year ago

Codecov Report

Merging #514 (4484c1a) into main (4c17bfa) will not change coverage. The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main     #514   +/-   ##
=======================================
  Coverage   95.48%   95.48%           
=======================================
  Files          69       69           
  Lines        2832     2832           
  Branches      403      403           
=======================================
  Hits         2704     2704           
  Misses         63       63           
  Partials       65       65           
Impacted Files Coverage Δ
mne_nirs/statistics/_statsmodels.py 90.90% <100.00%> (ø)