def validate_data(self): # lower- & upper-bound for banded Jacobian in range [0, neq] for name in ('ml', 'mu', 'mlmas', 'mumas'): if hasattr(self, name): self._parameters[name]['range'] = (0, self.neq+1) has_banded_jac = hasattr(self, 'jac_banded') ml, mu = getattr(self, 'ml', None), getattr(self, 'mu', None) if has_banded_jac and ((ml is None) or (mu is None)): raise ValueError('"ml" and "mu" have to be provided when banded Jacobian matrix is involved! Your input is (%s, %s).' % (ml, mu)) return Solver.validate_data(self)
def validate_data(self): # lower- & upper-bound for banded Jacobian in range [0, neq] for name in ('ml', 'mu', 'mlmas', 'mumas'): if hasattr(self, name): self._parameters[name]['range'] = (0, self.neq + 1) has_banded_jac = hasattr(self, 'jac_banded') ml, mu = getattr(self, 'ml', None), getattr(self, 'mu', None) if has_banded_jac and ((ml is None) or (mu is None)): raise ValueError( '"ml" and "mu" have to be provided when banded Jacobian matrix is involved! Your input is (%s, %s).' % (ml, mu)) return Solver.validate_data(self)