Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Use custom RNG for sketch path #5728
Conversation
mdboom
added this to the
Critical bugfix release (1.5.1)
milestone
Dec 23, 2015
mdboom
added the
needs_review
label
Dec 23, 2015
|
|
|
looks like xkcd tests are failing (as we changed the random number generator). |
|
Ah, of course. I'm not going to try to make it backward compatible, and just update the images :) Honestly, it's probably a good thing -- the C stdlib RNG doesn't guarantee any consistency across compilers anyway, but this should. |
|
The xkcd test have always been failing for me on OSX so that seems likely. Would be great if this fixes that too. |
|
|
|
appveyor is not failing when it fails, but this is showing up, it used to just fail on pixel errors.
|
|
ex
from https://ci.appveyor.com/project/mdboom/matplotlib/build/1.0.338/job/nl9a32g98n9o9rov |
tacaswell
and 2 others
commented on an outdated diff
Dec 26, 2015
| + static const uint32_t c = 2531011; | ||
| + uint32_t m_seed; | ||
| + | ||
| +public: | ||
| + RandomNumberGenerator() : m_seed(0) {} | ||
| + RandomNumberGenerator(int seed) : m_seed(seed) {} | ||
| + | ||
| + void seed(int seed) | ||
| + { | ||
| + m_seed = seed; | ||
| + } | ||
| + | ||
| + double get_double() | ||
| + { | ||
| + m_seed = (a * m_seed + c); | ||
| + return (double)m_seed / (double)(1L << 32); |
tacaswell
Owner
|
tacaswell
added a commit
that referenced
this pull request
Dec 29, 2015
|
|
tacaswell |
1446c69
|
tacaswell
merged commit 1446c69
into matplotlib:master
Dec 29, 2015
tacaswell
removed the
needs_review
label
Dec 29, 2015
tacaswell
added a commit
that referenced
this pull request
Dec 29, 2015
|
|
tacaswell |
3be4490
|
|
backported as 3be4490 |
mdboom commentedDec 23, 2015
This is an alternative to #5725.