[Numpy-discussion] Putting some random back into the top-level?
Wed Mar 14 12:08:15 CDT 2007
Please remind me what's wrong with pylab's
rand and randn !
I just learned about their existence recently and thought
they seem quite handy and should go directly into (the top-level of) numpy.
Functions that have the same name and do the same thing don't conflict
On 3/12/07, Rob Hetland <firstname.lastname@example.org> wrote:
> I, for one, would also like this. Perhaps it should not be called
> 'rand', however, as that conflicts with the pylab rand. (numpy load
> and pylab load also conflict -- probably the only reason I ever use
> import pylab as pl in my scripts). 'random' is already taken by the
> whole package... What does this leave that is still sensible?
> On Mar 9, 2007, at 2:01 PM, Bill Baxter wrote:
> > Has enough time passed with no top level random function that we can
> > now put one back in?
> > If I recall, the former top level rand() was basically removed because
> > it didn't adhere to the "shapes are always tuples" convention.
> > Has enough time passed now that we can put something like it back in
> > the top level, in tuple-taking form?
> > I think this is a function people use pretty frequently when writing
> > quick tests.
> > And numpy.random.random_sample seems a rather long and not so obvious
> > name for something that is used relatively frequently.
> > --bb
More information about the Numpy-discussion