def METHOD_NAME(time_index: pd.DatetimeIndex) -> np.ndarray:
    vals = time_index.dayofweek.values
    if normalized:
        vals = vals.astype(np.float32)
        vals = vals / 6.0 - 0.5
        vals = vals.reshape(-1, 1)
        return vals
    else:
        return vals.astype(np.int64)