def METHOD_NAME(x: DNDarray) -> DNDarray:
    """
    One-hot-encodes the passed vector or single-column matrix.
    Parameters
    ----------
    x : DNDarray
        The data to be encoded.
    """
    n_samples = x.shape[0]
    n_features = ht.max(x).item() + 1
    one_hot = ht.zeros((n_samples, n_features), split=x.split, device=x.device, comm=x.comm)
    one_hot.lloc[range(one_hot.lshape[0]), x.larray] = 1
    return one_hot