(model_inputs: np.ndarray,
                                model_outputs: np.ndarray,
                                trajectory_size: int,
                                delta: float)
return elementary_effects
Computes the Morris elementary effects.

    Parameters
    ----------
    model_inputs: np.ndarray
        matrix of inputs to the model under analysis.
        x-by-r where x is the number of variables and
        r is the number of rows (a function of x and num_trajectories)
    model_outputs: np.ndarray
        r-length vector of model outputs
    trajectory_size: int
        Number of points in a trajectory
    delta: float
        Scaling factor computed from `num_levels`

    Returns
    ---------
    elementary_effects : np.array
        Elementary effects for each parameter
Computes the Morris elementary effects.
Computes the Morris elementary effects .
def _compute_elementary_effects(model_inputs: np.ndarray,
                                model_outputs: np.ndarray,
                                trajectory_size: int,
                                delta: float) -> np.ndarray:
    """Computes the Morris elementary effects.

    Parameters
    ----------
    model_inputs: np.ndarray
        matrix of inputs to the model under analysis.
        x-by-r where x is the number of variables and
        r is the number of rows (a function of x and num_trajectories)
    model_outputs: np.ndarray
        r-length vector of model outputs
    trajectory_size: int
        Number of points in a trajectory
    delta: float
        Scaling factor computed from `num_levels`

    Returns
    ---------
    elementary_effects : np.array
        Elementary effects for each parameter
    """
    num_trajectories = _calculate_number_trajectories(model_inputs,
                                                      trajectory_size)

    output_matrix = _reshape_model_outputs(model_outputs, num_trajectories,
                                           trajectory_size)
    input_matrix = _reshape_model_inputs(model_inputs, num_trajectories,
                                         trajectory_size)

    delta_variables = _calculate_delta_input_variables(input_matrix)
    value_increased = delta_variables > 0
    value_decreased = delta_variables < 0

    result_increased = _reorganize_output_matrix(output_matrix,
                                                 value_increased,
                                                 value_decreased)
    result_decreased = _reorganize_output_matrix(output_matrix,
                                                 value_increased,
                                                 value_decreased,
                                                 increase=False)

    elementary_effects = _calc_results_difference(result_increased,
                                                  result_decreased)
    np.divide(elementary_effects, delta, out=elementary_effects)

    return elementary_effects
def _compute_elementary_effects ( model_inputs : np . ndarray , model_outputs : np . ndarray , trajectory_size : int , delta : float ) -> np . ndarray : num_trajectories = _calculate_number_trajectories ( model_inputs , trajectory_size ) output_matrix = _reshape_model_outputs ( model_outputs , num_trajectories , trajectory_size ) input_matrix = _reshape_model_inputs ( model_inputs , num_trajectories , trajectory_size ) delta_variables = _calculate_delta_input_variables ( input_matrix ) value_increased = delta_variables > 0 value_decreased = delta_variables < 0 result_increased = _reorganize_output_matrix ( output_matrix , value_increased , value_decreased ) result_decreased = _reorganize_output_matrix ( output_matrix , value_increased , value_decreased , increase = False ) elementary_effects = _calc_results_difference ( result_increased , result_decreased ) np . divide ( elementary_effects , delta , out = elementary_effects ) return elementary_effects