import sklearn.preprocessing as preprocessing x = [[7.8], [1.3], [4.5], [0.9]]print(preprocessing.Binarizer().fit(x).transform(x).shape)
Standard input is empty
(4, 1)
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!