def test_split_datasets():
    # Test the split dataset function.
    ddm = get_rnd_design_matrix()
    (train, valid) = ddm.split_dataset_holdout(train_prop=0.5)
    assert valid.shape[0] == np.ceil(ddm.get_num_examples() * 0.5)
    assert train.shape[0] == (valid.shape[0] - ddm.get_num_examples())
dataset/ETHPy150Open lisa-lab/pylearn2/pylearn2/datasets/tests/test_dense_design_matrix.py/test_split_datasets/swapped operands of `-`