def set_matrices_save_path(self, matrices_save_path):
        if matrices_save_path is not None:
            assert isinstance(matrices_save_path, str)
            matrices_save_path = os.path.abspath(matrices_save_path)

            if os.path.isdir(matrices_save_path):
                raise IOError('Matrix save path "%s" must not be an existing '
                              'directory.')

            assert matrices_save_path[-1] not in ('/', '\\')
            if not os.path.isdir(os.path.split(matrices_save_path)[0]):
                raise IOError('Couldn\'t find parent directory:\n'
                              '\t"%s"\n'
                              '\t of matrix path\n'
                              '\t"%s"')

        self.matrices_save_path = matrices_save_path
Analogous to DenseDesignMatrix.use_design_loc().
dataset/ETHPy150Open lisa-lab/pylearn2/pylearn2/datasets/preprocessing.py/ZCA.set_matrices_save_path