@@ -226,8 +226,8 @@ def __new__(
226
226
transform : optional
227
227
See ``Model.register_rv``.
228
228
**kwargs
229
- Keyword arguments that will be forwarded to ``.dist()``.
230
- Most prominently: ``shape`` and ``size``
229
+ Keyword arguments that will be forwarded to ``.dist()`` or the Aesara RV Op .
230
+ Most prominently: ``shape`` for ``.dist()`` and ``size`` or ``dtype`` for the Op.
231
231
232
232
Returns
233
233
-------
@@ -298,7 +298,6 @@ def dist(
298
298
dist_params ,
299
299
* ,
300
300
shape : Optional [Shape ] = None ,
301
- size : Optional [Size ] = None ,
302
301
** kwargs ,
303
302
) -> RandomVariable :
304
303
"""Creates a RandomVariable corresponding to the `cls` distribution.
@@ -312,8 +311,9 @@ def dist(
312
311
313
312
An Ellipsis (...) may be inserted in the last position to short-hand refer to
314
313
all the dimensions that the RV would get if no shape/size/dims were passed at all.
315
- size : int, tuple, Variable, optional
316
- For creating the RV like in Aesara/NumPy.
314
+ **kwargs
315
+ Keyword arguments that will be forwarded to the Aesara RV Op.
316
+ Most prominently: ``size`` or ``dtype``.
317
317
318
318
Returns
319
319
-------
@@ -337,6 +337,7 @@ def dist(
337
337
338
338
if "dims" in kwargs :
339
339
raise NotImplementedError ("The use of a `.dist(dims=...)` API is not supported." )
340
+ size = kwargs .pop ("size" , None )
340
341
if shape is not None and size is not None :
341
342
raise ValueError (
342
343
f"Passing both `shape` ({ shape } ) and `size` ({ size } ) is not supported!"
0 commit comments