Skip to content

Commit

Permalink
[FIX] Matplotlib and numba errors (#142)
Browse files Browse the repository at this point in the history
* fix: add missing matplotlib dep to environment

* fix: add tqdm to conda deps

* fix: fill between matplotlib behaviour

* fix: pin numpy version

see numba/numba#8615
  • Loading branch information
AzulGarza committed Dec 21, 2022
1 parent 81abd7b commit c34403e
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 12 deletions.
5 changes: 3 additions & 2 deletions environment.yml
Expand Up @@ -3,12 +3,13 @@ channels:
- conda-forge
dependencies:
- jupyterlab
- numpy
- numpy<1.24
- numba
- pandas
- scikit-learn
- quadprog
- matplotlib
- tqdm
- pip
- pip:
- nbdev
- tqdm
8 changes: 4 additions & 4 deletions hierarchicalforecast/utils.py
Expand Up @@ -192,8 +192,8 @@ def plot_series(self,
continue
ax.fill_between(
df_plot.index,
df_plot[f'{col}-lo-{lv}'],
df_plot[f'{col}-hi-{lv}'],
df_plot[f'{col}-lo-{lv}'].values,
df_plot[f'{col}-hi-{lv}'].values,
alpha=-lv/100 + 1,
color=cmap_dict[col],
label=f'{col}_level_{lv}'
Expand Down Expand Up @@ -248,8 +248,8 @@ def plot_hierarchically_linked_series(self,
continue
axs[idx].fill_between(
df_plot.index,
df_plot[f'{col}-lo-{lv}'],
df_plot[f'{col}-hi-{lv}'],
df_plot[f'{col}-lo-{lv}'].values,
df_plot[f'{col}-hi-{lv}'].values,
alpha=-lv/100 + 1,
color=cmap_dict[col],
label=f'{col}_level_{lv}'
Expand Down
10 changes: 5 additions & 5 deletions nbs/utils.ipynb
Expand Up @@ -331,8 +331,8 @@
" continue\n",
" ax.fill_between(\n",
" df_plot.index, \n",
" df_plot[f'{col}-lo-{lv}'], \n",
" df_plot[f'{col}-hi-{lv}'],\n",
" df_plot[f'{col}-lo-{lv}'].values, \n",
" df_plot[f'{col}-hi-{lv}'].values,\n",
" alpha=-lv/100 + 1,\n",
" color=cmap_dict[col],\n",
" label=f'{col}_level_{lv}'\n",
Expand Down Expand Up @@ -387,8 +387,8 @@
" continue\n",
" axs[idx].fill_between(\n",
" df_plot.index, \n",
" df_plot[f'{col}-lo-{lv}'], \n",
" df_plot[f'{col}-hi-{lv}'],\n",
" df_plot[f'{col}-lo-{lv}'].values, \n",
" df_plot[f'{col}-hi-{lv}'].values,\n",
" alpha=-lv/100 + 1,\n",
" color=cmap_dict[col],\n",
" label=f'{col}_level_{lv}'\n",
Expand Down Expand Up @@ -654,7 +654,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
}
Expand Down
2 changes: 1 addition & 1 deletion settings.ini
Expand Up @@ -15,7 +15,7 @@ language = English
custom_sidebar = True
license = apache2
status = 2
requirements = numpy numba pandas scikit-learn quadprog matplotlib tqdm
requirements = numpy<1.24 numba pandas scikit-learn quadprog matplotlib tqdm
dev_requirements = datasetsforecast statsforecast>=1.0.0 requests
nbs_path = nbs
doc_path = _docs
Expand Down

0 comments on commit c34403e

Please sign in to comment.