(problem: Dict, number_trajectories: int,
                   num_levels: int = 4)
return sample_morris.reshape((number_trajectories * (num_groups + 1),
                                  num_params))
Generate trajectories for groups

    Returns an :math:`N(g+1)`-by-:math:`k` array of `N` trajectories,
    where :math:`g` is the number of groups and :math:`k` is the number
    of factors

    Parameters
    ---------
    problem : dict
        The problem definition
    number_trajectories : int
        The number of trajectories to generate
    num_levels : int, default=4
        The number of grid levels

    Returns
    -------
    numpy.ndarray
Generate trajectories for groups
Generate trajectories for groups
def _sample_morris(problem: Dict, number_trajectories: int,
                   num_levels: int = 4) -> np.ndarray:
    """Generate trajectories for groups

    Returns an :math:`N(g+1)`-by-:math:`k` array of `N` trajectories,
    where :math:`g` is the number of groups and :math:`k` is the number
    of factors

    Parameters
    ---------
    problem : dict
        The problem definition
    number_trajectories : int
        The number of trajectories to generate
    num_levels : int, default=4
        The number of grid levels

    Returns
    -------
    numpy.ndarray
    """
    groups = _check_groups(problem)
    group_membership, _ = compute_groups_matrix(groups)
    _check_group_membership(group_membership)

    num_params = group_membership.shape[0]
    num_groups = group_membership.shape[1]

    sample_morris = [_generate_trajectory(group_membership, num_levels)
                     for _ in range(number_trajectories)]
    sample_morris = np.array(sample_morris)

    return sample_morris.reshape((number_trajectories * (num_groups + 1),
                                  num_params))
def _sample_morris ( problem : Dict , number_trajectories : int , num_levels : int = 4 ) -> np . ndarray : groups = _check_groups ( problem ) group_membership , _ = compute_groups_matrix ( groups ) _check_group_membership ( group_membership ) num_params = group_membership . shape [ 0 ] num_groups = group_membership . shape [ 1 ] sample_morris = [ _generate_trajectory ( group_membership , num_levels ) for _ in range ( number_trajectories ) ] sample_morris = np . array ( sample_morris ) return sample_morris . reshape ( ( number_trajectories * ( num_groups + 1 ) , num_params ) )