Skip to content

Commit

Permalink
Merge pull request #33 from martinvonk/object
Browse files Browse the repository at this point in the history
Create Standardized Index class
  • Loading branch information
martinvonk authored Mar 13, 2024
2 parents 59e6667 + b4f2bf4 commit ef05194
Show file tree
Hide file tree
Showing 10 changed files with 900 additions and 1,056 deletions.
75 changes: 46 additions & 29 deletions doc/examples/example01_indices.ipynb

Large diffs are not rendered by default.

478 changes: 60 additions & 418 deletions doc/examples/example02_distributions.ipynb

Large diffs are not rendered by default.

79 changes: 50 additions & 29 deletions doc/examples/example03_drought_NL.ipynb

Large diffs are not rendered by default.

8 changes: 5 additions & 3 deletions doc/examples/example04_package_comparison.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,9 @@
"import pastas as ps\n",
"import pandas as pd\n",
"import scipy.stats as scs\n",
"import matplotlib.pyplot as plt"
"import matplotlib.pyplot as plt\n",
"\n",
"print(si.show_versions())"
]
},
{
Expand Down Expand Up @@ -128,7 +130,7 @@
}
],
"source": [
"spi = si.spi(prec_rsum, dist=scs.gamma, prob_zero=True, freq=\"ME\")\n",
"spi = si.spi(prec_rsum, dist=scs.gamma, prob_zero=True, fit_freq=\"ME\")\n",
"spi # pandas Series"
]
},
Expand Down Expand Up @@ -449,7 +451,7 @@
" parse_dates=True,\n",
").squeeze()\n",
"\n",
"sgi = si.sgi(head, freq=\"ME\")\n",
"sgi = si.sgi(head, fit_freq=\"ME\")\n",
"sgi_pastas = ps.stats.sgi(head)"
]
},
Expand Down
2 changes: 1 addition & 1 deletion src/spei/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# flake8: noqa
from . import climdex, dist, plot, si, utils
from ._version import __version__, show_versions
from .si import sgi, spei, spi, ssfi
from .si import SI, sgi, spei, spi, ssfi
2 changes: 1 addition & 1 deletion src/spei/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
__version__ = "0.4.0"


def show_versions() -> None:
def show_versions() -> str:
msg = f"Versions\npython: {python_version()}\nspei: {__version__}\n"

requirements = metadata.requires("spei")
Expand Down
Loading

0 comments on commit ef05194

Please sign in to comment.