parameters: (self, thetas, ctol)
return_statement: return True
docstring: Check if the constraints are satisfied
docstring_summary: Check if the constraints are satisfied
docstring_tokens: Check if the constraints are satisfied
function: def constrs_satisfy(self, thetas, ctol):
          """Check if the constraints are satisfied"""
          N = thetas.shape[0]
          for idx_, con in self.constrs.eqs:
              for idx in self._indexes(idx_):
                  if (idx == 0 and self.fixedq0) or (idx == N - 1 and self.fixedqf):
                      continue
                  val = con.compute(thetas[idx], grad_level=0)[0]
                  if np.any(np.abs(val) > ctol):
                      return False
          for idx_, con in self.constrs.ineqs:
              for idx in self._indexes(idx_):
                  if (idx == 0 and self.fixedq0) or (idx == N - 1 and self.fixedqf):
                      continue
                  val = con.compute(thetas[idx], grad_level=0)[0]
                  if np.any(val > ctol):
                      return False
          return True
function_tokens: def constrs_satisfy ( self , thetas , ctol ) : N = thetas . shape [ 0 ] for idx_ , con in self . constrs . eqs : for idx in self . _indexes ( idx_ ) : if ( idx == 0 and self . fixedq0 ) or ( idx == N - 1 and self . fixedqf ) : continue val = con . compute ( thetas [ idx ] , grad_level = 0 ) [ 0 ] if np . any ( np . abs ( val ) > ctol ) : return False for idx_ , con in self . constrs . ineqs : for idx in self . _indexes ( idx_ ) : if ( idx == 0 and self . fixedq0 ) or ( idx == N - 1 and self . fixedqf ) : continue val = con . compute ( thetas [ idx ] , grad_level = 0 ) [ 0 ] if np . any ( val > ctol ) : return False return True