-
-
Notifications
You must be signed in to change notification settings - Fork 8.1k
DOC: Use Sphinx-gallery animation capture #17477
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
Changes from 3 commits
aaa9cc1
0d82faf
1df45d6
0a4dd1c
4780a81
de0fb17
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -189,10 +189,6 @@ div.documentwrapper { | |
| } | ||
| */ | ||
|
|
||
| div.clearer { | ||
| clear: both; | ||
| } | ||
|
|
||
| div.related h3 { | ||
| display: none; | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -39,7 +39,7 @@ def update(self, y): | |||||
| return self.line, | ||||||
|
|
||||||
|
|
||||||
| def emitter(p=0.03): | ||||||
| def emitter(p=0.1): | ||||||
| """Return a random value in [0, 1) with probability p, else 0.""" | ||||||
| while True: | ||||||
| v = np.random.rand(1) | ||||||
|
|
@@ -49,14 +49,14 @@ def emitter(p=0.03): | |||||
| yield np.random.rand(1) | ||||||
|
|
||||||
| # Fixing random state for reproducibility | ||||||
| np.random.seed(19680801) | ||||||
| np.random.seed(1968080) | ||||||
|
||||||
| np.random.seed(1968080) | |
| np.random.seed(19680801) |
One of the sentimental things we do is seed the random numbers to John Hunter's birthday. Would rather not change this unless there is a compelling reason.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was intentional -- the original seed did not yield many spikes for the given probability (and increasing the probability further made too many spikes) over the first few seconds of the animation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about I write it as 19680801 // 10? Same effect but preserves the birthday in there?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Or I could test if 0 or 41 EDIT: 42 or 1337 or some other "principled" choice of seed gives something that plays well in the animation)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
19680801 // 10 <- if that looks good 👍
Could also "prime" the stream a bit by generating and discarding a bunch of numbers?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pushed the // 10 let's see if CircleCI produces something reasonable -- it should!
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,5 +12,6 @@ colorspacious | |
| ipython | ||
| ipywidgets | ||
| numpydoc>=0.8 | ||
| sphinx-gallery>=0.5 | ||
| sphinx-gallery>=0.7 | ||
| sphinx-copybutton | ||
| scipy | ||
Uh oh!
There was an error while loading. Please reload this page.