How to use LHSExperiment ?

I want to use the method LHSExperiment from OpenTURNS version 0.13.1.

I use LHSExperiment(distribution, size) under this form but I have an error (wrong number of argument) and I don't understand my mistake.


1. souchaud@… -- 2011-04-22 15:23


Don't forget that the better way to obtain support is to subscribe to the users mailing list ( ) and then send your question.


2. souchaud@… -- 2011-04-22 15:23

These commands work and are the same:


You must declare a 1D-distribution

3. souchaud@… -- 2011-04-22 15:23


You forgot to cast your ComposedDistribution into a Distribution object. The conversion is automatic in C++, but must be made explicitely in python: myRandomExp=LHSExperiment(Distribution(inputDistribution),1000)

By the way, the LHSExperiment class is by no way limited to 1D distributions, but the distribution should have an independent copula (which is always the case for 1D distributions). If the copula is not the independent one, it is silently replaced by the independent copula for the sample generation.