def METHOD_NAME(fitResults, metadata, slicesUsed=None, resultCode=-1, fitErr=None):
    slicesUsed = fmtSlicesUsed(slicesUsed)
    res = np.zeros(1, dtype=fresultdtype)
    n_params = len(fitResults)
    res['tIndex'] = metadata.tIndex
    res['fitResults'].view('7f4')[:n_params] = fitResults
    if fitErr is None:
        res['fitError'].view('7f4')[:] = -5e3
    else:
        res['fitError'].view('7f4')[:n_params] = fitErr
    res['resultCode'] = resultCode
    res['slicesUsed'] = slicesUsed
    return res
    # return np.array([(tIndex, fitResults.astype('f'), fitErr.astype('f'), resultCode, fmtSlicesUsed(slicesUsed))], dtype=fresultdtype)