fork download
  1. # your code goes here
  2. import sklearn.preprocessing as preprocessing
  3.  
  4. x = [[7.8], [1.3], [4.5], [0.9]]
  5. print(preprocessing.Binarizer().fit(x).transform(x))
Success #stdin #stdout 0.69s 70176KB
stdin
Standard input is empty
stdout
[[1.]
 [1.]
 [1.]
 [1.]]