Skip to content

Commit 5b8eb72

Browse files
committed
DOC: fix doctests, move numpy.random -> numpy.random.gen in generator.pyx
1 parent 0e7589e commit 5b8eb72

File tree

3 files changed

+105
-103
lines changed

3 files changed

+105
-103
lines changed

numpy/random/common.pyx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -305,10 +305,10 @@ cdef int check_array_constraint(np.ndarray val, object name, constraint_type con
305305
elif cons == CONS_BOUNDED_0_1:
306306
if not np.all(np.greater_equal(val, 0)) or \
307307
not np.all(np.less_equal(val, 1)):
308-
raise ValueError("{0} < 0 , {0} > 1 or {0} contains NaNs".format(name))
308+
raise ValueError("{0} < 0, {0} > 1 or {0} contains NaNs".format(name))
309309
elif cons == CONS_BOUNDED_GT_0_1:
310310
if not np.all(np.greater(val, 0)) or not np.all(np.less_equal(val, 1)):
311-
raise ValueError("{0} <= 0 , {0} > 1 or {0} contains NaNs".format(name))
311+
raise ValueError("{0} <= 0, {0} > 1 or {0} contains NaNs".format(name))
312312
elif cons == CONS_GT_1:
313313
if not np.all(np.greater(val, 1)):
314314
raise ValueError("{0} <= 1 or {0} contains NaNs".format(name))
@@ -336,10 +336,10 @@ cdef int check_constraint(double val, object name, constraint_type cons) except
336336
raise ValueError(name + " <= 0")
337337
elif cons == CONS_BOUNDED_0_1:
338338
if not (val >= 0) or not (val <= 1):
339-
raise ValueError("{0} < 0 , {0} > 1 or {0} is NaN".format(name))
339+
raise ValueError("{0} < 0, {0} > 1 or {0} is NaN".format(name))
340340
elif cons == CONS_BOUNDED_GT_0_1:
341341
if not val >0 or not val <= 1:
342-
raise ValueError("{0} <= 0 , {0} > 1 or {0} contains NaNs".format(name))
342+
raise ValueError("{0} <= 0, {0} > 1 or {0} contains NaNs".format(name))
343343
elif cons == CONS_GT_1:
344344
if not (val > 1):
345345
raise ValueError("{0} <= 1 or {0} is NaN".format(name))

0 commit comments

Comments
 (0)