class_docstr: Simple implementation of "Exact Matrix Completion via Convex Optimization"
  by Emmanuel Candes and Benjamin Recht using cvxpy.
docstr: Parameters
  ----------
  X : np.array
      Data matrix with missing values filled in
  
  missing_mask : np.array
      Boolean array indicating where missing values were
  
  S : cvxpy.Variable
      Representation of solution variable
code: def _constraints(self, X, missing_mask, S, error_tolerance):
      """
      Parameters
      ----------
      X : np.array
          Data matrix with missing values filled in
  
      missing_mask : np.array
          Boolean array indicating where missing values were
  
      S : cvxpy.Variable
          Representation of solution variable
      """
      ok_mask = ~missing_mask
      masked_X = cvxpy.multiply(ok_mask, X)
      masked_S = cvxpy.multiply(ok_mask, S)
      abs_diff = cvxpy.abs(masked_S - masked_X)
      close_to_data = abs_diff <= error_tolerance
      constraints = [close_to_data]
      if self.require_symmetric_solution:
          constraints.append(S == S.T)
  
      if self.min_value is not None:
          constraints.append(S >= self.min_value)
  
      if self.max_value is not None:
          constraints.append(S <= self.max_value)
  
      return constraints
  
file_path: fancyimpute/fancyimpute/nuclear_norm_minimization.py
imports: import cvxpy
  from .solver import Solver
  from sklearn.utils import check_array
label_desc: Use image node_id 2 for calling the NuclearNormMinimization obj's underlying member method code with example usage: obj._constraints(X, missing_mask, S, error_tolerance) and returns: constraints