Skip to content

Commit ffc059f

Browse files
committed
remove time_covariate_vector default args
1 parent a232e4c commit ffc059f

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

pymc_extras/distributions/discrete.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -509,7 +509,7 @@ def dist(cls, r, alpha, time_covariate_vector=None, *args, **kwargs):
509509
time_covariate_vector = pt.as_tensor_variable(time_covariate_vector)
510510
return super().dist([r, alpha, time_covariate_vector], *args, **kwargs)
511511

512-
def logp(value, r, alpha, time_covariate_vector=None):
512+
def logp(value, r, alpha, time_covariate_vector):
513513
if time_covariate_vector is None:
514514
time_covariate_vector = pt.constant(0.0)
515515
time_covariate_vector = pt.as_tensor_variable(time_covariate_vector)
@@ -547,14 +547,12 @@ def C_t(t):
547547
msg="r > 0, alpha > 0",
548548
)
549549

550-
def logcdf(value, r, alpha, time_covariate_vector=None):
550+
def logcdf(value, r, alpha, time_covariate_vector):
551551
if time_covariate_vector is None:
552552
time_covariate_vector = pt.constant(0.0)
553553
time_covariate_vector = pt.as_tensor_variable(time_covariate_vector)
554554

555555
def C_t(t):
556-
if t == 0:
557-
return pt.constant(0.0)
558556
if time_covariate_vector.ndim == 0:
559557
return t
560558
else:
@@ -576,7 +574,7 @@ def C_t(t):
576574
msg="r > 0, alpha > 0",
577575
)
578576

579-
def support_point(rv, size, r, alpha, time_covariate_vector=None):
577+
def support_point(rv, size, r, alpha, time_covariate_vector):
580578
"""Calculate a reasonable starting point for sampling.
581579
582580
For the GrassiaIIGeometric distribution, we use a point estimate based on

0 commit comments

Comments
 (0)