def test_vector_q_raises_dynamic(self):
    x = [1., 5., 3., 2., 4.]
    q_ph = array_ops.placeholder(dtypes.float32)
    pct = sample_stats.percentile(x, q=q_ph, validate_args=True)
    with self.test_session():
      with self.assertRaisesOpError("rank"):
        pct.eval(feed_dict={q_ph: [0.5]})