class_docstr: Linear operator for the L-BFGS approximate inverse Hessian.
  
  This operator computes the product of a vector with the approximate inverse
  of the Hessian of the objective function, using the L-BFGS limited
  memory approximation to the inverse Hessian, accumulated during the
  optimization.
  
  Objects of this class implement the ``scipy.sparse.linalg.LinearOperator``
  interface.
  
  Parameters
  ----------
  sk : array_like, shape=(n_corr, n)
      Array of `n_corr` most recent updates to the solution vector.
      (See [1]).
  yk : array_like, shape=(n_corr, n)
      Array of `n_corr` most recent updates to the gradient. (See [1]).
  
  References
  ----------
  .. [1] Nocedal, Jorge. "Updating quasi-Newton matrices with limited
     storage." Mathematics of computation 35.151 (1980): 773-782.
class_docstr_tok: ["Linear","operator","for","the","L-BFGS","approximate","inverse","Hessian",".","This","operator","computes","the","product","of","a","vector","with","the","approximate","inverse","of","the","Hessian","of","the","objective","function",",","using","the","L-BFGS","limited","memory","approximation","to","the","inverse","Hessian",",","accumulated","during","the","optimization",".","Objects","of","this","class","implement","the","``","scipy.sparse.linalg.LinearOperator","``","interface",".","Parameters","--","--","--","--","--","sk",":","array_like",",","shape=","(","n_corr",",","n",")","Array","of","`","n_corr","`","most","recent","updates","to","the","solution","vector",".","(","See","[","1","]",")",".","yk",":","array_like",",","shape=","(","n_corr",",","n",")","Array","of","`","n_corr","`","most","recent","updates","to","the","gradient",".","(","See","[","1","]",")",".","References","--","--","--","--","--","..","[","1","]","Nocedal",",","Jorge",".","``","Updating","quasi-Newton","matrices","with","limited","storage",".","''","Mathematics","of","computation","35.151","(","1980",")",":","773-782","."]
docstr: Construct the operator.
docstr_tok: ["Construct","the","operator","."]
code: def __init__(self, sk, yk):
      """Construct the operator."""
      if sk.shape != yk.shape or sk.ndim != 2:
          raise ValueError(
              "sk and yk must have matching shape, (n_corrs, n)"
          )
      n_corrs, n = sk.shape
  
      super().__init__(dtype=np.float64, shape=(n, n))
  
      self.sk = sk
      self.yk = yk
      self.n_corrs = n_corrs
      self.rho = 1 / np.einsum("ij,ij->i", sk, yk)
  
file_path: catboost/contrib/python/scipy/py3/scipy/optimize/lbfgsb.py
imports: import numpy
  from numpy import array, asarray, float64, zeros
  from .None import _lbfgsb
  from .optimize import MemoizeJac, OptimizeResult, _check_unknown_options, _prepare_scalar_function
  from ._constraints import old_bound_to_new
  from scipy.sparse.linalg import LinearOperator
label_desc: Use image node_id 1 to create a new LbfgsInvHessProduct object from inherited base classes: LinearOperator with example: obj = LbfgsInvHessProduct(sk, yk)