def _asarray_2d_null_rows(x):
 x = np.asarray(x)
 if (x.ndim == 1):
  x = x[:, None]
 return np.any(isnull(x), axis=1)[:, None]

def _asarray_2d_null_rows ( x ) : x = np . asarray ( x ) if ( x . ndim == 1 ) : x = x [ : , None ] return np . any ( isnull ( x ) , axis = 1 ) [ : , None ]
makes sure input is an array and is 2d .