'Initialize the _parameters array that stores raw parameter values for
all parameter sets for use with vectorized fitting algorithms; on
FittableModels the _param_name attributes actually just reference
slices of this array.'

def _initialize_parameters(self, args, kwargs):

    if hasattr(self, u'_parameters'):
        return
    n_models = kwargs.pop(u'n_models', None)
    if (not ((n_models is None) or (isinstance(n_models, (int, np.integer)) and (n_models >= 1)))):
        raise ValueError(u'n_models    must    be    either    None    (in    which    case    it    is    determined    from    the    model_set_axis    of    the    parameter    initial    values)    or    it    must    be    a    positive    integer    (got    {0!r})'.format(n_models))
    model_set_axis = kwargs.pop(u'model_set_axis', None)
    if (model_set_axis is None):
        if ((n_models is not None) and (n_models > 1)):
            model_set_axis = 0
        else:
            model_set_axis = False
    elif (not ((model_set_axis is False) or (isinstance(model_set_axis, int) and (not isinstance(model_set_axis, bool))))):
        raise ValueError(u'model_set_axis    must    be    either    False    or    an    integer    specifying    the    parameter    array    axis    to    map    to    each    model    in    a    set    of    models    (got    {0!r}).'.format(model_set_axis))
    params = {}
    if (len(args) > len(self.param_names)):
        raise TypeError(u'{0}.__init__()    takes    at    most    {1}    positional    arguments    ({2}    given)'.format(self.__class__.__name__, len(self.param_names), len(args)))
    self._model_set_axis = model_set_axis
    self._param_metrics = defaultdict(dict)
    for (idx, arg) in enumerate(args):
        if (arg is None):
            continue
        params[self.param_names[idx]] = quantity_asanyarray(arg, dtype=np.float)
    for param_name in self.param_names:
        if (param_name in kwargs):
            if (param_name in params):
                raise TypeError(u'{0}.__init__()    got    multiple    values    for    parameter    {1!r}'.format(self.__class__.__name__, param_name))
            value = kwargs.pop(param_name)
            if (value is None):
                continue
            params[param_name] = quantity_asanyarray(value, dtype=np.float)
    if kwargs:
        for kwarg in kwargs:
            raise TypeError(u'{0}.__init__()    got    an    unrecognized    parameter    {1!r}'.format(self.__class__.__name__, kwarg))
    if ((model_set_axis is not False) and (n_models != 1) and params):
        max_ndim = 0
        if (model_set_axis < 0):
            min_ndim = abs(model_set_axis)
        else:
            min_ndim = (model_set_axis + 1)
        for (name, value) in six.iteritems(params):
            param_ndim = np.ndim(value)
            if (param_ndim < min_ndim):
                raise InputParameterError(u'All    parameter    values    must    be    arrays    of    dimension    at    least    {0}    for    model_set_axis={1}    (the    value    given    for    {2!r}    is    only    {3}-dimensional)'.format(min_ndim, model_set_axis, name, param_ndim))
            max_ndim = max(max_ndim, param_ndim)
            if (n_models is None):
                n_models = value.shape[model_set_axis]
            elif (value.shape[model_set_axis] != n_models):
                raise InputParameterError(u'Inconsistent    dimensions    for    parameter    {0!r}    for    {1}    model    sets.        The    length    of    axis    {2}    must    be    the    same    for    all    input    parameter    values'.format(name, n_models, model_set_axis))
        self._check_param_broadcast(params, max_ndim)
    else:
        if (n_models is None):
            n_models = 1
        self._check_param_broadcast(params, None)
    self._n_models = n_models
    self._initialize_parameter_values(params)
