1111 ArrayLikeGetitemArgType ,
1212 ArrayType ,
1313 DTypeArgType ,
14- FloatArgType ,
1514 ScalarType ,
1615 SeedType ,
1716 ShapeArgType ,
@@ -337,7 +336,8 @@ def var(self) -> ArrayType:
337336 def std (self ) -> ArrayType :
338337 """Standard deviation of the random variable.
339338
340- To learn about the dtype of the standard deviation, see :attr:`expectation_dtype`.
339+ To learn about the dtype of the standard deviation, see
340+ :attr:`expectation_dtype`.
341341 """
342342 if self .__std is None :
343343 std = backend .sqrt (self .var )
@@ -578,7 +578,9 @@ def __neg__(self) -> "RandomVariable":
578578 return RandomVariable (
579579 shape = self .shape ,
580580 dtype = self .dtype ,
581- sample = lambda rng , size : - self .sample (rng = rng , size = size ),
581+ sample = lambda seed , sample_shape : - self .sample (
582+ seed = seed , sample_shape = sample_shape
583+ ),
582584 in_support = lambda x : self .in_support (- x ),
583585 mode = lambda : - self .mode ,
584586 median = lambda : - self .median ,
@@ -592,7 +594,9 @@ def __pos__(self) -> "RandomVariable":
592594 return RandomVariable (
593595 shape = self .shape ,
594596 dtype = self .dtype ,
595- sample = lambda rng , size : + self .sample (rng = rng , size = size ),
597+ sample = lambda seed , sample_shape : + self .sample (
598+ seed = seed , sample_shape = sample_shape
599+ ),
596600 in_support = lambda x : self .in_support (+ x ),
597601 mode = lambda : + self .mode ,
598602 median = lambda : + self .median ,
@@ -606,7 +610,9 @@ def __abs__(self) -> "RandomVariable":
606610 return RandomVariable (
607611 shape = self .shape ,
608612 dtype = self .dtype ,
609- sample = lambda rng , size : abs (self .sample (rng = rng , size = size )),
613+ sample = lambda seed , sample_shape : abs (
614+ self .sample (seed = seed , sample_shape = sample_shape )
615+ ),
610616 )
611617
612618 # Binary arithmetic operations
@@ -891,6 +897,8 @@ def __init__(
891897 std : Optional [Callable [[], ArrayType ]] = None ,
892898 entropy : Optional [Callable [[], ScalarType ]] = None ,
893899 ):
900+ # pylint: disable=too-many-arguments,too-many-locals
901+
894902 # Probability mass function
895903 self .__pmf = pmf
896904 self .__logpmf = logpmf
@@ -1098,6 +1106,8 @@ def __init__(
10981106 std : Optional [Callable [[], ArrayType ]] = None ,
10991107 entropy : Optional [Callable [[], ArrayType ]] = None ,
11001108 ):
1109+ # pylint: disable=too-many-arguments,too-many-locals
1110+
11011111 # Probability density function
11021112 self .__pdf = pdf
11031113 self .__logpdf = logpdf
0 commit comments