Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Drop dependency on scipy in the docs. #22120

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 6, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 4 additions & 2 deletions examples/mplot3d/polys3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down
1 change: 0 additions & 1 deletion requirements/doc/doc-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,3 @@ sphinxcontrib-svg2pdfconverter>=1.1.0
sphinx-gallery>=0.10
sphinx-copybutton
sphinx-panels
scipy