title: How to split/partition a dataset into training and test datasets for, e.g., cross validation?
body: <p>What is a good way to split a NumPy array randomly into training and testing/validation dataset? Something similar to the <code>cvpartition</code> or <code>crossvalind</code> functions in Matlab.</p>