Show
Ignore:
Timestamp:
06/02/09 15:43:33 (15 months ago)
Author:
ptvirtan
Message:

Regenerate mtrand.c

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/numpy/random/mtrand/mtrand.c

    r7014 r7033  
    1 /* Generated by Cython 0.11.2 on Thu May 21 15:38:07 2009 */ 
     1/* Generated by Cython 0.11.2 on Tue Jun  2 23:24:54 2009 */ 
    22 
    33#define PY_SSIZE_T_CLEAN 
     
    80268026 
    80278027static PyObject *__pyx_pf_6mtrand_11RandomState_gamma(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ 
    8028 static char __pyx_doc_6mtrand_11RandomState_gamma[] = "\n""        gamma(shape, scale=1.0, size=None)\n""\n""        Draw samples from a Gamma distribution.\n""\n""        Samples are drawn from a Gamma distribution with specified parameters,\n""        `shape` (sometimes designated \"k\") and `scale` (sometimes designated\n""        \"theta\"), where both parameters are > 0.\n""\n""        Parameters\n""        ----------\n""        shape : scalar > 0\n""            The shape of the gamma distribution.\n""        scale : scalar > 0, optional\n""            The scale of the gamma distribution.  Default is equal to 1.\n""        size : shape_tuple, optional\n""            Output shape.  If the given shape is, e.g., ``(m, n, k)``, then\n""            ``m * n * k`` samples are drawn.\n""\n""        Returns\n""        -------\n""        out : ndarray, float\n""            Returns one sample unless `size` parameter is specified.\n""\n""        See Also\n""        --------\n""        scipy.stats.distributions.gamma : probability density function,\n""            distribution or cumulative density function, etc.\n""\n""        Notes\n""        -----\n""        The probability density for the Gamma distribution is\n""\n""        .. math:: p(x) = x^{k-1}\\frac{e^{-x/\\theta}}{\\theta^k\\Gamma(k)},\n""\n""        where :math:`k` is the shape and :math:`\\theta` the scale,\n""        and :math:`\\Gamma` is the Gamma function.\n""\n""        The Gamma distribution is often used to model the times to failure of\n""        electronic components, and arises naturally in processes for which the\n""        waiting times between Poisson distributed events are relevant.\n""\n""        References\n""        ----------\n""        .. [1] Weisstein, Eric W. \"Gamma Distribution.\" From MathWorld--A\n""               Wolfram Web Resource.\n""               http://mathworld.wolfram.com/GammaDistribution.html\n""        .. [2] Wikipedia, \"Gamma-distribution\",\n""               http://en.wikipedia.org/wiki/Gamma-distribution\n""\n""        Examples\n""        --------\n""        Draw samples from the distribution:\n""\n""        >>> shape, scale = 2., 2. # mean and dispersion\n""        >>> s = np.random.gamma(shape, scale, 1000)\n""\n""        Display the histogram of the samples, along with\n""        the probability density function:\n""\n""        >>> import matplotlib.pyplot as plt\n""        >>> import scipy.special as sps\n""        >>> count, bins, ignored = plt.hist(s, 50, normed=True)\n""        >>> y = bins**(shape-1)*(exp(-bins/scale) /\n""        ...                      (sps.gamma(shape)*scale**shape))\n""        >>> plt.plot(bins, y, linewidth=2, color='r')\n""        >>> plt.show()\n""\n""        "; 
     8028static char __pyx_doc_6mtrand_11RandomState_gamma[] = "\n""        gamma(shape, scale=1.0, size=None)\n""\n""        Draw samples from a Gamma distribution.\n""\n""        Samples are drawn from a Gamma distribution with specified parameters,\n""        `shape` (sometimes designated \"k\") and `scale` (sometimes designated\n""        \"theta\"), where both parameters are > 0.\n""\n""        Parameters\n""        ----------\n""        shape : scalar > 0\n""            The shape of the gamma distribution.\n""        scale : scalar > 0, optional\n""            The scale of the gamma distribution.  Default is equal to 1.\n""        size : shape_tuple, optional\n""            Output shape.  If the given shape is, e.g., ``(m, n, k)``, then\n""            ``m * n * k`` samples are drawn.\n""\n""        Returns\n""        -------\n""        out : ndarray, float\n""            Returns one sample unless `size` parameter is specified.\n""\n""        See Also\n""        --------\n""        scipy.stats.distributions.gamma : probability density function,\n""            distribution or cumulative density function, etc.\n""\n""        Notes\n""        -----\n""        The probability density for the Gamma distribution is\n""\n""        .. math:: p(x) = x^{k-1}\\frac{e^{-x/\\theta}}{\\theta^k\\Gamma(k)},\n""\n""        where :math:`k` is the shape and :math:`\\theta` the scale,\n""        and :math:`\\Gamma` is the Gamma function.\n""\n""        The Gamma distribution is often used to model the times to failure of\n""        electronic components, and arises naturally in processes for which the\n""        waiting times between Poisson distributed events are relevant.\n""\n""        References\n""        ----------\n""        .. [1] Weisstein, Eric W. \"Gamma Distribution.\" From MathWorld--A\n""               Wolfram Web Resource.\n""               http://mathworld.wolfram.com/GammaDistribution.html\n""        .. [2] Wikipedia, \"Gamma-distribution\",\n""               http://en.wikipedia.org/wiki/Gamma-distribution\n""\n""        Examples\n""        --------\n""        Draw samples from the distribution:\n""\n""        >>> shape, scale = 2., 2. # mean and dispersion\n""        >>> s = np.random.gamma(shape, scale, 1000)\n""\n""        Display the histogram of the samples, along with\n""        the probability density function:\n""\n""        >>> import matplotlib.pyplot as plt\n""        >>> import scipy.special as sps\n""        >>> count, bins, ignored = plt.hist(s, 50, normed=True)\n""        >>> y = bins**(shape-1)*(np.exp(-bins/scale) /\n""        ...                      (sps.gamma(shape)*scale**shape))\n""        >>> plt.plot(bins, y, linewidth=2, color='r')\n""        >>> plt.show()\n""\n""        "; 
    80298029static PyObject *__pyx_pf_6mtrand_11RandomState_gamma(PyObject *__pyx_v_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { 
    80308030  PyObject *__pyx_v_shape = 0;