def pressure(self, loading):
    '\n        Calculate pressure at specified loading.\n\n        For the TemkinApprox model, the pressure will\n        be computed numerically as no analytical inversion is possible.\n\n        Parameters\n        ----------\n        loading : float\n            The loading at which to calculate the pressure.\n\n        Returns\n        -------\n        float\n            Pressure at specified loading.\n        '

    def fun(x):
        return (self.loading(x) - loading)
    opt_res = scipy.optimize.root(fun, 0, method='hybr')
    if (not opt_res.success):
        raise CalculationError('\n            Root finding for value {0} failed.\n            '.format(loading))
    return opt_res.x
Calculate pressure at specified loading.

For the TemkinApprox model, the pressure will
be computed numerically as no analytical inversion is possible.

Parameters
----------
loading : float
    The loading at which to calculate the pressure.

Returns
-------
float
    Pressure at specified loading.
def pressure(self, loading):
    '\n        Calculate pressure at specified loading.\n\n        For the TemkinApprox model, the pressure will\n        be computed numerically as no analytical inversion is possible.\n\n        Parameters\n        ----------\n        loading : float\n            The loading at which to calculate the pressure.\n\n        Returns\n        -------\n        float\n            Pressure at specified loading.\n        '

    def fun(x):
        return (self.loading(x) - loading)
    opt_res = scipy.optimize.root(fun, 0, method='hybr')
    if (not opt_res.success):
        raise CalculationError('\n            Root finding for value {0} failed.\n            '.format(loading))
    return opt_res.x