def test_hdf5_load_all():
    skip_if_no_h5py()
    import h5py

    # save random data to HDF5
    handle, filename = tempfile.mkstemp()
    dataset = random_one_hot_dense_design_matrix(np.random.RandomState(1),
                                                 num_examples=10, dim=5,
                                                 num_classes=3)
    with h5py.File(filename, 'w') as f:
        f.create_dataset('X', data=dataset.get_design_matrix())
        f.create_dataset('y', data=dataset.get_targets())

    # instantiate Train object
    trainer = yaml_parse.load(load_all_yaml % {'filename': filename})
    trainer.main_loop()

    # cleanup
    os.remove(filename)
Reverses the byte order of an int (16-bit) or long (32-bit) value.
dataset/ETHPy150Open lisa-lab/pylearn2/pylearn2/datasets/tests/test_hdf5.py/test_hdf5_load_all--crossover with--dataset/ETHPy150Open adafruit/Adafruit_Python_GPIO/Adafruit_GPIO/I2C.py/reverseByteOrder