

def standardize_Y(shape, Y):
    if (not numpy_array(Y)):
        Y = np.asarray(Y)
    if (len(Y.shape) == 1):
        Y = Y.reshape((- 1), 1)
    if ((len(Y.shape) == 2) and (len(shape) == 2)):
        if (shape[(- 1)] != Y.shape[(- 1)]):
            return one_hot(Y, n=shape[(- 1)])
        else:
            return Y
    else:
        return Y

dataset/ETHPy150Open IndicoDataSolutions/Foxhound/foxhound/preprocessing.py standardize_Y/original