You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This can be mended by replacing pandas.DataFrame.at[val] = (...) call in stats.stats.py::compare(...) L306
with the more appropriate pandas.DataFrame.loc[val, :] = (...).
more appropriate because according to the pandas documentation, at is used to "Access a single value for a row/column label pair.". The code in compare() obviously accesses multiple values.
Full error trace:
Traceback (most recent call last):
File "/usr/lib/python3.10/site-packages/pandas/core/indexes/base.py", line 3800, in get_loc
return self._engine.get_loc(casted_key)
File "pandas/_libs/index.pyx", line 138, in pandas._libs.index.IndexEngine.get_loc
File "pandas/_libs/index.pyx", line 144, in pandas._libs.index.IndexEngine.get_loc
TypeError: 'slice(None, None, None)' is an invalid key
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "test.py", line 6, in <module>
comparison = az.compare(compare_dict)
File "/usr/lib/python3.10/site-packages/arviz/stats/stats.py", line 306, in compare
df_comp.at[val] = (
File "/usr/lib/python3.10/site-packages/pandas/core/indexing.py", line 2438, in __setitem__
return super().__setitem__(key, value)
File "/usr/lib/python3.10/site-packages/pandas/core/indexing.py", line 2393, in __setitem__
self.obj._set_value(*key, value=value, takeable=self._takeable)
File "/usr/lib/python3.10/site-packages/pandas/core/frame.py", line 4208, in _set_value
icol = self.columns.get_loc(col)
File "/usr/lib/python3.10/site-packages/pandas/core/indexes/base.py", line 3807, in get_loc
self._check_indexing_error(key)
File "/usr/lib/python3.10/site-packages/pandas/core/indexes/base.py", line 5963, in _check_indexing_error
raise InvalidIndexError(key)
pandas.errors.InvalidIndexError: slice(None, None, None)
Hope this helps! Thanks,
Falk
The text was updated successfully, but these errors were encountered:
model comparison fails on my system when running the standard comparison example provided here:
https://arviz-devs.github.io/arviz/api/generated/arviz.compare.html
(trace below)
Python
3.10.7
arviz.__version__ = 0.12.1
pandas.__version__ = 1.5.0
This can be mended by replacing
pandas.DataFrame.at[val] = (...)
call instats.stats.py::compare(...)
L306with the more appropriate
pandas.DataFrame.loc[val, :] = (...)
.more appropriate because according to the pandas documentation,
at
is used to "Access a single value for a row/column label pair.". The code incompare()
obviously accesses multiple values.Full error trace:
Hope this helps! Thanks,
Falk
The text was updated successfully, but these errors were encountered: