From 11477a8f6fefc3b1f8bfe8fe215076426d627257 Mon Sep 17 00:00:00 2001 From: Henry Schreiner Date: Thu, 20 Jul 2023 17:50:05 -0400 Subject: [PATCH] fix: plot extra split into [fit] Signed-off-by: Henry Schreiner --- README.md | 5 +++-- pyproject.toml | 2 ++ src/hist/plot.py | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 7c1a8487..7d7a1a0f 100644 --- a/README.md +++ b/README.md @@ -29,10 +29,11 @@ Python 3.7+ (3.6 users get version 2.4). See [what's new](https://hist.readthedo You can install this library from [PyPI](https://pypi.org/project/hist/) with pip: ```bash -python3 -m pip install "hist[plot]" +python3 -m pip install "hist[plot,fit]" ``` -If you do not need the plotting features, you can skip the `[plot]` extra. +If you do not need the plotting features, you can skip the `[plot]` and/or +`[fit]` extras. `[fit]` is not currently supported in WebAssembly. ## Features diff --git a/pyproject.toml b/pyproject.toml index 6203b801..c6b58675 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -60,6 +60,8 @@ mpl = [ plot = [ "matplotlib >=3.0", "mplhep >=0.2.16", +] +fit = [ "scipy >=1.4", "iminuit >=2", ] diff --git a/src/hist/plot.py b/src/hist/plot.py index 46ab9a82..d69c7ebc 100644 --- a/src/hist/plot.py +++ b/src/hist/plot.py @@ -32,7 +32,7 @@ "plot_stack", ) -_PLT_MISSING_MSG = "Hist plotting with fitting requires scipy and iminuit. Please install hist[plot] or manually install dependencies." +_PLT_MISSING_MSG = "Hist plotting with fitting requires scipy and iminuit. Please install hist[plot,fit] or manually install dependencies." class FitResultArtists(NamedTuple):