fides/hessian_approximation.py
def init_mat(self, dim: int):
        """
        Initializes this approximation instance and checks the dimensionality

        :param dim:
            dimension of optimization variables
        """
        if self.hess_init is None:
            self._hess = np.eye(dim)
        else:
            self._hess = self.hess_init.copy()
            if self._hess.shape[0] != dim:
                raise ValueError('Initial approximation had inconsistent '
                                 f'dimension, was {self._hess.shape[0]}, '
                                 f'but should be {dim}.')

        Initializes this approximation instance and checks the dimensionality

        :param dim:
            dimension of optimization variables
        
Initializes this approximation instance and checks the dimensionality
Initializes this approximation instance and checks the dimensionality
def init_mat(self, dim: int):
        if self.hess_init is None:
            self._hess = np.eye(dim)
        else:
            self._hess = self.hess_init.copy()
            if self._hess.shape[0] != dim:
                raise ValueError('Initial approximation had inconsistent '
                                 f'dimension, was {self._hess.shape[0]}, '
                                 f'but should be {dim}.')
def init_mat ( self , dim : int ) : if self . hess_init is None : self . _hess = np . eye ( dim ) else : self . _hess = self . hess_init . copy ( ) if self . _hess . shape [ 0 ] != dim : raise ValueError ( 'Initial approximation had inconsistent ' f'dimension, was {self._hess.shape[0]}, ' f'but should be {dim}.' )
Initializes this approximation instance and checks the dimensionality
Initializes this approximation instance and checks the dimensionality
"""
        Initializes this approximation instance and checks the dimensionality

        :param dim:
            dimension of optimization variables
        """
self
dim
int
dimension of optimization variables
dimension of optimization variables