added mention of sklearn.utils.validation.check_random_state as a comment

This commit is contained in:
Kevin Keraudren
2016-05-08 08:22:00 +01:00
parent 4ff20b83aa
commit 9fa6548f7d
+1
View File
@@ -201,6 +201,7 @@ def check_random_state(seed):
If seed is already a RandomState instance, return it.
Otherwise raise ValueError.
"""
# Function originally from scikit-learn's module sklearn.utils.validation
if seed is None or seed is np.random:
return np.random.mtrand._rand
if isinstance(seed, (numbers.Integral, np.integer)):