Extract numpy array from single column data table

def _maybe_dt_array(array):
    """ Extract numpy array from single column data table """
    if not isinstance(array, DataTable) or array is None:
        return array

    if array.shape[1] > 1:
        raise ValueError('DataTable for label or weight cannot have multiple columns')

    # below requires new dt version
    # extract first column
    array = array.to_numpy()[:, 0].astype('float')

    return array