[Numpy-discussion] Code samples in docstrings mistaken as doctests
Robert Kern
robert.kern at gmail.com
Mon Jun 23 23:57:25 EDT 2008
On Mon, Jun 23, 2008 at 22:53, Anne Archibald <peridot.faceted at gmail.com> wrote:
> 2008/6/23 Michael Abshoff <michael.abshoff at googlemail.com>:
>> 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
> meaninglessly?
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.
--
Robert Kern
"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
mailing list