'__array_wrap__ is called at the end of every ufunc.
Normally, we want a Column object back and do not have to do anything
special. But there are two exceptions:
1) If the output shape is different (e.g. for reduction ufuncs
like sum() or mean()), a Column still linking to a parent_table
makes little sense, so we return the output viewed as the
column content (ndarray or MaskedArray).
For this case, we use "[()]" to select everything, and to ensure we
convert a zero rank array to a scalar. (For some reason np.sum()
returns a zero rank scalar array while np.mean() returns a scalar;
So the [()] is needed for this case.
2) When the output is created by any function that returns a boolean
we also want to consistently return an array rather than a column
(see #1446 and #1685)'

def __array_wrap__(self, out_arr, context=None):

    out_arr = super(BaseColumn, self).__array_wrap__(out_arr, context)
    if ((self.shape != out_arr.shape) or (isinstance(out_arr, BaseColumn) and ((context is not None) and (context[0] in _comparison_functions)))):
        return out_arr.data[()]
    else:
        return out_arr
