Skip to content

Commit

Permalink
Merge branch 'master' into fix-gt-warning
Browse files Browse the repository at this point in the history
  • Loading branch information
mmcky committed Sep 3, 2019
2 parents aa35e3c + 35215de commit f348e23
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions quantecon/random/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,13 +200,13 @@ def draw(cdf, size=None):
"""
if isinstance(size, types.Integer):
def draw_impl(cdf, size):
rs = np.random.random_sample(size)
rs = np.random.random(size)
out = np.empty(size, dtype=np.int_)
for i in range(size):
out[i] = searchsorted(cdf, rs[i])
return out
else:
def draw_impl(cdf, size):
r = np.random.random_sample()
r = np.random.random()
return searchsorted(cdf, r)
return draw_impl

0 comments on commit f348e23

Please sign in to comment.