def _check_params(p, speciesDict, xb):
    """
    Check to see if any of the parameters in p fall outside the range
        given in speciesDict or on the boundaries

    **Parameters**

    :p: (3,) ndarray

        array with form [[N1, b1, z1], ...]

    :speciesDict: dictionary

        dictionary with properties giving the max and min
        values appropriate for each parameter N,b, and z.

    :xb: (N) ndarray

        wavelength array [nm]

    **Returns**
    -------
    :check: int

        0 if all values are fine
        999 if any values fall outside acceptable range
    """
    minz = xb[0] / speciesDict['wavelength'][0] - 1
    maxz = xb[-1] / speciesDict['wavelength'][0] - 1
    check = 0
    if any(p[:, (0)] >= speciesDict['maxN']) or any(p[:, (0)] <=
        speciesDict['minN']) or any(p[:, (1)] >= speciesDict['maxb']) or any(
        p[:, (1)] <= speciesDict['minb']) or any(p[:, (2)] >= maxz) or any(
        p[:, (2)] <= minz):
        check = 999
    return check
