@@ -101,48 +101,26 @@ def beta(a, b, size=None):
101
101
102
102
Draw samples from a Beta distribution.
103
103
104
- The Beta distribution is a special case of the Dirichlet distribution,
105
- and is related to the Gamma distribution. It has the probability
106
- distribution function
104
+ For full documentation refer to :obj:`numpy.random.beta`.
107
105
108
- .. math:: f(x; a,b) = \\ frac{1}{B(\\ alpha, \\ beta)} x^{\\ alpha - 1}
109
- (1 - x)^{\\ beta - 1},
110
-
111
- where the normalization, B, is the beta function,
112
-
113
- .. math:: B(\\ alpha, \\ beta) = \\ int_0^1 t^{\\ alpha - 1}
114
- (1 - t)^{\\ beta - 1} dt.
115
-
116
- It is often seen in Bayesian inference and order statistics.
117
-
118
- Parameters
119
- ----------
120
- a : float
121
- Alpha, positive (>0).
122
- b : float
123
- Beta, positive (>0).
124
- size : int or tuple of ints, optional
125
- Output shape. If the given shape is, e.g., ``(m, n, k)``, then
126
- ``m * n * k`` samples are drawn. If size is ``None`` (default),
127
- a single value is returned if ``a`` and ``b`` are both scalars.
106
+ Limitations
107
+ -----------
108
+ Parameters ``a`` and ``b`` are supported as scalar.
109
+ Otherwise, :obj:`numpy.random.beta(a, b, size)` samples are drawn.
110
+ Output array data type is :obj:`dpnp.float64`.
128
111
129
- Returns
130
- -------
131
- out : dparray
132
- Drawn samples from the parameterized beta distribution.
112
+ Examples
113
+ --------
114
+ Draw samples from the distribution:
115
+ >>> a, b = .4, .5 # alpha, beta
116
+ >>> s = dpnp.random.beta(a, b, 1000)
133
117
134
118
"""
135
119
136
- # TODO:
137
- # array_like of floats for `a`, `b`
138
120
if not use_origin_backend (a ) and dpnp_queue_is_cpu ():
139
- if isinstance (size , tuple ):
140
- for dim in size :
141
- if not isinstance (dim , int ):
142
- pass
143
- elif not isinstance (size , int ):
144
- pass
145
- elif not dpnp .isscalar (a ):
121
+ # TODO:
122
+ # array_like of floats for `a`, `b`
123
+ if not dpnp .isscalar (a ):
146
124
pass
147
125
elif not dpnp .isscalar (b ):
148
126
pass
0 commit comments