from tensorflow.contrib.distributions.python.ops import distribution_util

    with self._name_scope(name, values=[x]):
      x = ops.convert_to_tensor(x, name="x")
      sample_shape, batch_shape, event_shape = self.get_shape(x)
      event_shape = distribution_util.pick_vector(
          self._event_ndims_is_0, (1,), event_shape)
      batch_shape = distribution_util.pick_vector(
          self._batch_ndims_is_0, (1,), batch_shape)
      new_shape = array_ops.concat(0, ((-1,), batch_shape, event_shape))
      x = array_ops.reshape(x, shape=new_shape)
      x = distribution_util.rotate_transpose(x, shift=-1)
