def as2d(ar):
 if (ar.ndim == 2):
  return ar
 else:
  aux = np.array(ar, copy=False)
  aux.shape = (ar.shape[0], 1)
  return aux

def as2d ( ar ) : if ( ar . ndim == 2 ) : return ar else : aux = np . array ( ar , copy = False ) aux . shape = ( ar . shape [ 0 ] , 1 ) return aux
if the input array is 2d return it .