summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
Diffstat (limited to 'numpy')
-rw-r--r--numpy/random/_generator.pyx2
-rw-r--r--numpy/random/mtrand.pyx2
2 files changed, 2 insertions, 2 deletions
diff --git a/numpy/random/_generator.pyx b/numpy/random/_generator.pyx
index cd0b24872..e2430d139 100644
--- a/numpy/random/_generator.pyx
+++ b/numpy/random/_generator.pyx
@@ -585,7 +585,7 @@ cdef class Generator:
Examples
--------
>>> np.random.default_rng().bytes(10)
- b'\xfeC\x9b\x86\x17\xf2\xa1\xafcp' # random
+ b'\\xfeC\\x9b\\x86\\x17\\xf2\\xa1\\xafcp' # random
"""
cdef Py_ssize_t n_uint32 = ((length - 1) // 4 + 1)
diff --git a/numpy/random/mtrand.pyx b/numpy/random/mtrand.pyx
index 863879a04..4f5862faa 100644
--- a/numpy/random/mtrand.pyx
+++ b/numpy/random/mtrand.pyx
@@ -795,7 +795,7 @@ cdef class RandomState:
Examples
--------
>>> np.random.bytes(10)
- ' eh\\x85\\x022SZ\\xbf\\xa4' #random
+ b' eh\\x85\\x022SZ\\xbf\\xa4' #random
"""
cdef Py_ssize_t n_uint32 = ((length - 1) // 4 + 1)
# Interpret the uint32s as little-endian to convert them to bytes