Guest User

Untitled

a guest
Feb 18th, 2019
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. import numpy as np
  2.  
  3. train_X_full = np.array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19])
  4. print(train_X_full.size)
  5.  
  6. n = int((train_X_full.size)/2)
  7. print(n)
  8.  
  9. train_X = np.array([])
  10. train_X = np.random.choice(train_X_full, n, replace=False)
  11. print(train_X.size)
  12. print(train_X)
Add Comment
Please, Sign In to add comment