def _mnl_utility_transform(systematic_utilities, *args, **kwargs):
    """
    Parameters
    ----------
    systematic_utilities : 1D ndarray.
        Should contain the systematic utilities for each each available
        alternative for each observation.

    Returns
    -------
    `systematic_utilities[:, None]`
    """
    # Be sure to return a 2D array since other functions will be expecting this
    if len(systematic_utilities.shape) == 1:
        systematic_utilities = systematic_utilities[:, np.newaxis]

    return systematic_utilities
def _mnl_utility_transform ( systematic_utilities , * args , ** kwargs ) : if len ( systematic_utilities . shape ) == 1 : systematic_utilities = systematic_utilities [ : , np . newaxis ] return systematic_utilities
Parameters
    ----------
    systematic_utilities : 1D ndarray.
        Should contain the systematic utilities for each each available
        alternative for each observation.

    Returns
    -------
    `systematic_utilities[:, None]`