INNER CODE UNIT · Python

load_npz

HadrienG/InSilicoSeq · iss/error_models/__init__.py:27

    def load_npz(self, npz_path, model):
        """load the error profile .npz file

        Args:
            npz_path (string): path to the npz file
            model (string): type of model. Could be 'cdf' or 'kde'. 'cdf' has
                been deprecated and is no longer available

        Returns:
            ndarray: numpy object containg variables necessary
                for error model construction
        """
        try:
            error_profile = np.load(npz_path, allow_pickle=True)
            assert error_profile["model"] == model
        except (OSError, IOError, EOFError, _pickle.UnpicklingError) as e:
            self.logger.error("Failed to read ErrorModel file: %s" % e)
            sys.exit(1)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…