[SciPy-dev] numpy.random.randint

Robert Kern robert.kern at gmail.com
Fri Mar 10 18:29:18 CST 2006

Fernando Perez wrote:
> Robert Kern wrote:
>>I also avoided the "shape" terminology for the "shape" parameters, too, to avoid
>>conflation. However, a lot of the probability distributions do have a "shape"
>>parameter. lognormal, gamma, beta, pareto, and on and on and on. Anything that
>>isn't a location or a scale parameter is called a shape parameter in probability
> Mmh, 'dshape' as a compromise solution, for the distribution shape parameter? 
>   I understand that 'shape' may be the time-honored convention, but given that 
> here there is a clash between array.shape and the distribution one, and that 
> arrays 'come first' (being the most basic object in all of numpy/scipy), 
> perhaps a compromise is acceptable?  It seems easier to tell users  of 
> distributions
> "the parameter typically named 'shape' in distribution theory is called dshape 
> in our library, to avoid conflicts with the 'shape' attribute that all array 
> ojbects have"
> than to constantly have to sort out the confusion of two uses of the same word.
> At least it seems so to me.  But I have no strong feelings on this topic, so 
> take this as a simple suggestion, and feel free to ignore it.

I don't use "shape" as a keyword argument at all. I wanted to avoid both of the
possible confusions. Actually, Travis O. wanted to avoid the confusions, and so
he wrote the scipy.stats distributions objects using size=, and I just followed
his lead.

Robert Kern
robert.kern at gmail.com

"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 Scipy-dev mailing list