'Return: n_, p_, npcond.
n_ and p_ are arrays of the correct shape; npcond is a boolean array
flagging values out of the domain.'

def _process_parameters(self, n, p):

    p = np.array(p, dtype=np.float64, copy=True)
    p[..., (-1)] = (1.0 - p[..., :(-1)].sum(axis=(-1)))
    pcond = np.any((p <= 0), axis=(-1))
    pcond |= np.any((p > 1), axis=(-1))
    n = np.array(n, dtype=np.int, copy=True)
    ncond = (n <= 0)
    return (n, p, (ncond | pcond))
