Ejemplo n.º 1
0
def assert_no_time(X):
    if X.ndim == 2:
        return X
    if X.ndim != 3:
        raise ValueError('ndim must be 2 or 3, but it is %i' % X.ndim)
    return wild_reshape(X, (-1, X.shape[2]))
Ejemplo n.º 2
0
def assert_no_time(X):
    if X.ndim == 2:
        return X
    if X.ndim != 3:
        raise ValueError('ndim must be 2 or 3, but it is %i' % X.ndim)
    return wild_reshape(X, (-1, X.shape[2]))
Ejemplo n.º 3
0
def recover_time(X, time_steps):
    return wild_reshape(X, (time_steps, -1, X.shape[1]))
Ejemplo n.º 4
0
def recover_time(X, time_steps):
    return wild_reshape(X, (time_steps, -1, X.shape[1]))