def as2d(ar):
if ar.ndim == <NUM_LIT:2>:<EOL><INDENT>return ar<EOL><DEDENT>else:  <EOL><INDENT>aux = np.array(ar, copy=False)<EOL>aux.shape = (ar.shape[<NUM_LIT:0>], <NUM_LIT:1>)<EOL>return aux<EOL><DEDENT>
If the input array is 2D return it, if it is 1D, append a dimension,
making it a column vector.