fork download
  1. from numpy import random
  2. import numpy as np
  3. dataset = np.array(['paul', 'jacob', 'vince', 'paul', 'miky', 'jacob', 'warren'])
  4. new_var = (dataset == 'paul') | (dataset == 'jacob')
  5. print(new_var)
Success #stdin #stdout 0.07s 23592KB
stdin
Standard input is empty
stdout
[ True  True False  True False  True False]