[Numpy-discussion] Code samples in docstrings mistaken as doctests
Mon Jun 23 22:57:25 CDT 2008
On Mon, Jun 23, 2008 at 22:53, Anne Archibald <email@example.com> wrote:
> 2008/6/23 Michael Abshoff <firstname.lastname@example.org>:
>> Correct, but so far Carl has hooked into six out of the many random
>> number generators in the various components of Sage. This way we can set
>> a global seed and also more easily reproduce issues with algorithms
>> where randomness plays a role without being forced to be on the same
>> platform. There are still doctests in Sage where the randomness comes
>> from sources not in randgen (Carl's code), but sooner or later we will
>> get around to all of them.
> Doesn't this mean you can't change your implementation of random
> number generators (for example choosing a different implementation of
> generation of normally-distributed random numbers, or replacing the
> Mersenne Twister) without causing countless doctests to fail
It's not that bad. After you've verified that your new code works, you
regenerate the examples. You check in both at the same time.
"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
-- Umberto Eco
More information about the Numpy-discussion