def _check_percentile(self, q):
msg = ("<STR_LIT>"<EOL>"<STR_LIT>")<EOL>q = np.asarray(q)<EOL>if q.ndim == <NUM_LIT:0>:<EOL><INDENT>if not <NUM_LIT:0> <= q <= <NUM_LIT:1>:<EOL><INDENT>raise ValueError(msg.format(q / <NUM_LIT>))<EOL><DEDENT><DEDENT>else:<EOL><INDENT>if not all(<NUM_LIT:0> <= qs <= <NUM_LIT:1> for qs in q):<EOL><INDENT>raise ValueError(msg.format(q / <NUM_LIT>))<EOL><DEDENT><DEDENT>return q<EOL>
Validate percentiles (used by describe and quantile).