def binarize(qualitative):
thresholds = qualitative.min(<NUM_LIT:1>) + (qualitative.max(<NUM_LIT:1>) - qualitative.min(<NUM_LIT:1>))/<NUM_LIT><EOL>binarized = qualitative > thresholds.reshape((len(thresholds), <NUM_LIT:1>)).repeat(<NUM_LIT:8>,<NUM_LIT:1>)<EOL>return binarized.astype(int)<EOL>
binarizes an expression dataset.