Skip to content

Commit ea20703

Browse files
authored
Fix interpolate random (#4184)
* Fix interpolate random * Make sure the test actually run * remove unuse import * fix float32 test * formatting * mark test xfailed on float32 as before * add back import
1 parent a7b6bc9 commit ea20703

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pymc3/distributions/continuous.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4097,7 +4097,7 @@ def _argcdf(self, p):
40974097
def _random(self, size=None):
40984098
return self._argcdf(np.random.uniform(size=size))
40994099

4100-
def random(self, size=None):
4100+
def random(self, point=None, size=None):
41014101
"""
41024102
Draw random values from Interpolated distribution.
41034103

pymc3/tests/test_distributions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ def product(domains, n_samples=-1):
174174
try:
175175
names, domains = zip(*domains.items())
176176
except ValueError: # domains.items() is empty
177-
return []
177+
return [{}]
178178
all_vals = [zip(names, val) for val in itertools.product(*[d.vals for d in domains])]
179179
if n_samples > 0 and len(all_vals) > n_samples:
180180
return (all_vals[j] for j in nr.choice(len(all_vals), n_samples, replace=False))

0 commit comments

Comments
 (0)