src/estimagic/differentiation/finite_differences.py
def _calculate_outer_product_steps(signed_steps, n_steps, dim_x):
    """Calculate array of outer product of steps.

    Args:
        signed_steps (np.ndarray): Square array with either pos or neg steps returned
            by :func:`~estimagic.differentiation.generate_steps.generate_steps` function
        n_steps (int): Number of steps needed. For central methods, this is
            the number of steps per direction. It is 1 if no Richardson extrapolation
            is used.
        dim_x (int): Dimension of input vector x.

    Returns:
        outer_product_steps (np.ndarray): Array with outer product of steps. Has
            dimension (n_steps, 1, dim_x, dim_x).

    """
    outer_product_steps = np.array(
        [np.outer(signed_steps[j], signed_steps[j]) for j in range(n_steps)]
    ).reshape(n_steps, 1, dim_x, dim_x)
    return outer_product_steps
Calculate array of outer product of steps.

    Args:
        signed_steps (np.ndarray): Square array with either pos or neg steps returned
            by :func:`~estimagic.differentiation.generate_steps.generate_steps` function
        n_steps (int): Number of steps needed. For central methods, this is
            the number of steps per direction. It is 1 if no Richardson extrapolation
            is used.
        dim_x (int): Dimension of input vector x.

    Returns:
        outer_product_steps (np.ndarray): Array with outer product of steps. Has
            dimension (n_steps, 1, dim_x, dim_x).

    
Calculate array of outer product of steps.
Calculate array of outer product of steps .
def _calculate_outer_product_steps(signed_steps, n_steps, dim_x):
    outer_product_steps = np.array(
        [np.outer(signed_steps[j], signed_steps[j]) for j in range(n_steps)]
    ).reshape(n_steps, 1, dim_x, dim_x)
    return outer_product_steps
def _calculate_outer_product_steps ( signed_steps , n_steps , dim_x ) : outer_product_steps = np . array ( [ np . outer ( signed_steps [ j ] , signed_steps [ j ] ) for j in range ( n_steps ) ] ) . reshape ( n_steps , 1 , dim_x , dim_x ) return outer_product_steps
Calculate array of outer product of steps.
Calculate array of outer product of steps .
"""Calculate array of outer product of steps.

    Args:
        signed_steps (np.ndarray): Square array with either pos or neg steps returned
            by :func:`~estimagic.differentiation.generate_steps.generate_steps` function
        n_steps (int): Number of steps needed. For central methods, this is
            the number of steps per direction. It is 1 if no Richardson extrapolation
            is used.
        dim_x (int): Dimension of input vector x.

    Returns:
        outer_product_steps (np.ndarray): Array with outer product of steps. Has
            dimension (n_steps, 1, dim_x, dim_x).

    """
outer_product_steps (np.ndarray): Array with outer product of steps. Has
dimension (n_steps, 1, dim_x, dim_x).
outer_product_steps ( np . ndarray ) : Array with outer product of steps . Has dimension ( n_steps 1 dim_x dim_x ) .
signed_steps
Square array with either pos or neg steps returned
by :func:`~estimagic.differentiation.generate_steps.generate_steps` function
Square array with either pos or neg steps returned by : func : ` ~estimagic . differentiation . generate_steps . generate_steps ` function
n_steps
Number of steps needed. For central methods, this is
the number of steps per direction. It is 1 if no Richardson extrapolation
is used.
Number of steps needed . For central methods this is the number of steps per direction . It is 1 if no Richardson extrapolation is used .
dim_x
Dimension of input vector x.
Dimension of input vector x .