def check_completion(self):
terminate = False<EOL>term_dict = self.get_termination_stats(get_cos=self.costol is not None)<EOL>terminate |= np.all(np.abs(term_dict['<STR_LIT>']) < self.paramtol)<EOL>terminate |= (term_dict['<STR_LIT>'] < self.errtol)<EOL>terminate |= (term_dict['<STR_LIT>'] < self.exptol)<EOL>terminate |= (term_dict['<STR_LIT>'] < self.fractol)<EOL>if self.costol is not None:<EOL><INDENT>terminate |= (curcos < term_dict['<STR_LIT>'])<EOL><DEDENT>return terminate<EOL>
Returns a Bool of whether the algorithm has found a satisfactory minimum