georgebv/pyextremes

Multi-dimensional indexing (e.g. `obj[:, None]`) is no longer supported. Convert to a numpy array before indexing instead.

Yun-Tianming opened this issue · 3 comments

Describe the bug
Example of user guide's threshold selection, althought i ran it successfully.
I create a new environment for it but still fail:
conda create --name EVA_env python=3.10
conda activate EVA_env
pip install pyextremes[full]

specific part
axes = plot_threshold_stability(data, return_period=100, thresholds=np.linspace(0.20, 0.26, 20), progress=True)
ERRO: Multi-dimensional indexing (e.g. obj[:, None]) is no longer supported. Convert to a numpy array before indexing instead.

but Mean Residual Life can be ploted.
ML89_FNGVWGD{BWK( Y9DSV

Before answering your question, I don't recommend mixing pip and conda together. Pyextremes is available on conda forge as conda install -c conda-forge pyextremes.

Regarding your question, data must be pandas.Series object with date time index. Try passing it to EVA and see what it tells you https://georgebv.github.io/pyextremes/quickstart/#create-model

I confirm that data is a panda.Series object, and if not, Mean Residual Life can not be ploted.
I follow your suggestion to recreate a enviroment. Unfortunately, it still don't work as before:
conda create --name EVA_env python=3.11
conda activate EVA_env
conda install -c conda-forge pyextremes
image
image

Please follow all instructions from my previous message (about index and EVA), those should resolve your issue