def flatter(x, k=<NUM_LIT:1>):
if k == <NUM_LIT:0>: return x<EOL>x = x.toarray() if sps.issparse(x) else np.asarray(x)<EOL>if len(x.shape) - abs(k) < <NUM_LIT:2>: return x.flatten()<EOL>k += np.sign(k)<EOL>if k > <NUM_LIT:0>: return np.reshape(x, (-<NUM_LIT:1>,) + x.shape[k:])<EOL>else:     return np.reshape(x, x.shape[:k] + (-<NUM_LIT:1>,))<EOL>
flatter(x) yields a numpy array equivalent to x but whose first dimension has been flattened.
flatter(x, k) yields a numpy array whose first k dimensions have been flattened; if k is
  negative, the last k dimensions are flattened. If np.inf or -np.inf is passed, then this is
  equivalent to flattest(x). Note that flatter(x) is equivalent to flatter(x,1).
flatter(x, 0) yields x.