summaryrefslogtreecommitdiff
path: root/numpy/random/mtrand
diff options
context:
space:
mode:
Diffstat (limited to 'numpy/random/mtrand')
-rw-r--r--numpy/random/mtrand/mtrand.pyx3
1 files changed, 2 insertions, 1 deletions
diff --git a/numpy/random/mtrand/mtrand.pyx b/numpy/random/mtrand/mtrand.pyx
index bf3a385a9..ee0e31172 100644
--- a/numpy/random/mtrand/mtrand.pyx
+++ b/numpy/random/mtrand/mtrand.pyx
@@ -143,6 +143,7 @@ cdef extern from "initarray.h":
import_array()
cimport cython
+import copy
import numpy as np
import operator
import warnings
@@ -4871,7 +4872,7 @@ cdef class RandomState:
if isinstance(x, (int, long, np.integer)):
arr = np.arange(x)
else:
- arr = np.array(x)
+ arr = copy.copy(x)
self.shuffle(arr)
return arr