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]))
def recover_time(X, time_steps): return wild_reshape(X, (time_steps, -1, X.shape[1]))