def keep_sources(self, keep):
        """Keep only the specified sources in the decomposition.
        """
        if self.unmixing_ is None or self.mixing_ is None:
            raise RuntimeError("No sources available (run do_mvarica first)")
        n_sources = self.mixing_.shape[0]
        self.remove_sources(np.setdiff1d(np.arange(n_sources), np.array(keep)))
        return self
def keep_sources ( self , keep ) : if self . unmixing_ is None or self . mixing_ is None : raise RuntimeError ( "No sources available (run do_mvarica first)" ) n_sources = self . mixing_ . shape [ 0 ] self . remove_sources ( np . setdiff1d ( np . arange ( n_sources ) , np . array ( keep ) ) ) return self
Keep only the specified sources in the decomposition.