Computing Conditional Quantiles

The method computeConditionalQuantile of a distribution seams only to deal with the last component. What is the trick to get the conditional quantile of say X2 of a 3 dim distribution X1,X2,X3 ie. the conditional quantile of the second component, not the last.

One possible solution is to reorder the components using getMarginal (here swap x1 and x2):

dist = ot.Normal([10,0], ot.CovarianceMatrix([[1.0, 0.5], [0.5, 1.0]]))
dist.getMarginal([1,0]).computeConditionalQuantile(0.9, [0])

Hi!
The ConditionalDistribution in the otbenchmark module can be used to create the conditional distribution. Then the quantile can be computed once the distribution is defined.
Regards,
Michaƫl

careful there is already a ConditionalDistribution in OT, but its a different thing: the parameters are conditioned by another distribution