[Numpy-discussion] additions to random: innovative names vs. algorithm specification

Robert Kern robert.kern at gmail.com
Thu Jul 29 17:21:15 EDT 2010


On Thu, Jul 29, 2010 at 16:03, Alan G Isaac <alan.isaac at gmail.com> wrote:
> On 7/29/2010 4:37 PM, Robert Kern wrote:
>> this MATLAB API is deprecated
>
> The old API has been replaced by a constructor that still takes a
> string literal argument to determine the PRNG algorithm.
> See the bottom of
> http://www.mathworks.com/access/helpdesk/help/techdoc/math/brt5wsv.html
> This approach would match my suggestion.

Since your suggestion was so vague and your citation talks about
multiple things, yes, I guess so. It's certainly not what Chuck
interpreted your suggestion to be. "Matching your suggestion" is not
the same thing as communicating clearly.

> Even an module approach would
> match my suggestion (one module per underlying PRNG algorithm).  I just
> think it will pay off to avoid simply multiplying function names
> (e.g., introducing znormal this year, and whatever new name next year).

New sampling algorithms aren't invented *all* that often.

That said, it would be reasonable to add arguments to the RandomState
constructor to allow it to select different algorithms for each of the
distributions.

-- 
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