Skip to content
This repository
Browse code

P3K : Convert int type checking to np.integer

  • Loading branch information...
commit cf464246093683a2c54ec2b7683faf6c7f964708 1 parent ef7b166
Subhodeep Moitra authored GaelVaroquaux committed

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  sklearn/utils/validation.py
2  sklearn/utils/validation.py
@@ -184,7 +184,7 @@ def check_random_state(seed):
184 184
     """
185 185
     if seed is None or seed is np.random:
186 186
         return np.random.mtrand._rand
187  
-    if isinstance(seed, int):
  187
+    if isinstance(seed, (int,np.integer)):
188 188
         return np.random.RandomState(seed)
189 189
     if isinstance(seed, np.random.RandomState):
190 190
         return seed

0 notes on commit cf46424

Please sign in to comment.
Something went wrong with that request. Please try again.