def CheckPars(pars, Pinfo):
    """
    Helper function that checks an array of parameters inplace
    pars: 1D numpy array of length Npar
    Pinfo: tuple/list of Pinfo objects of length Npar
    """
    pLen = pars.size
    piLen = len(Pinfo)

    if(piLen != pLen):
        print("[error] CheckPars: Error, parameter array has different length than Parameter info array: {0} != {1}".format(pLen, piLen))
        return 0

    for ii in range(pLen):
        pars[ii] = Pinfo[ii].checkLimits(pars[ii])

    return 1