def __init__(self, file, key, target_key=None):
        loaded = numpy.load(file)
        assert not isinstance(loaded, numpy.ndarray), (
            "zipped groups of arrays (.npz) only"
        )
        assert key in loaded, "%s not found in loaded NPZFile" % key

        if target_key is not None:
            assert target_key in loaded, \
                "%s not found in loaded NPZFile" % target_key
            y = loaded[target_key]
        else:
            y = None

        if len(loaded[key].shape) == 2:
            super(NpzDataset, self).__init__(X=loaded[key], y=y)
        else:
            super(NpzDataset, self).__init__(topo_view=loaded[key], y=y)

        loaded.close()
Retrieve YAML configuration file from the default config directory or flavor directory.
dataset/ETHPy150Open lisa-lab/pylearn2/pylearn2/datasets/npy_npz.py/NpzDataset.__init__--crossover with--dataset/ETHPy150Open chapmanb/cloudbiolinux/cloudbio/flavor/config.py/get_config_file