From 040cae72a6cbb9aadfd11171e952ac453750ed02 Mon Sep 17 00:00:00 2001 From: Antony Lee Date: Thu, 23 Dec 2021 14:03:45 +0100 Subject: [PATCH 1/2] Drop dependency on scipy in the docs. --- environment.yml | 1 - examples/mplot3d/polys3d.py | 6 ++++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/environment.yml b/environment.yml index d73d7a99f579..6ed4969f7398 100644 --- a/environment.yml +++ b/environment.yml @@ -29,7 +29,6 @@ dependencies: - numpydoc>=0.8 - packaging - pydata-sphinx-theme - - scipy - sphinx>=1.8.1,!=2.0.0 - sphinx-copybutton - sphinx-gallery>=0.10 diff --git a/examples/mplot3d/polys3d.py b/examples/mplot3d/polys3d.py index ce9905958bd6..393f5dcf6544 100644 --- a/examples/mplot3d/polys3d.py +++ b/examples/mplot3d/polys3d.py @@ -10,8 +10,8 @@ from matplotlib.collections import PolyCollection import matplotlib.pyplot as plt +import math import numpy as np -from scipy.stats import poisson # Fixing random state for reproducibility np.random.seed(19680801) @@ -31,7 +31,9 @@ def polygon_under_graph(x, y): lambdas = range(1, 9) # verts[i] is a list of (x, y) pairs defining polygon i. -verts = [polygon_under_graph(x, poisson.pmf(l, x)) for l in lambdas] +gamma = np.vectorize(math.gamma) +verts = [polygon_under_graph(x, l**x * np.exp(-l) / gamma(x + 1)) + for l in lambdas] facecolors = plt.colormaps['viridis_r'](np.linspace(0, 1, len(verts))) poly = PolyCollection(verts, facecolors=facecolors, alpha=.7) From d89d3e04abbe92346474dcd6529b664ef2a82acc Mon Sep 17 00:00:00 2001 From: Thomas A Caswell Date: Wed, 5 Jan 2022 20:37:27 -0500 Subject: [PATCH 2/2] CI: skip installing scipy on circle --- requirements/doc/doc-requirements.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/requirements/doc/doc-requirements.txt b/requirements/doc/doc-requirements.txt index c77787e4c72b..e62449662a34 100644 --- a/requirements/doc/doc-requirements.txt +++ b/requirements/doc/doc-requirements.txt @@ -18,4 +18,3 @@ sphinxcontrib-svg2pdfconverter>=1.1.0 sphinx-gallery>=0.10 sphinx-copybutton sphinx-panels -scipy