1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
#! /usr/bin/env python
import openturns as ot
ot.TESTPREAMBLE()
# Instantiate one distribution object
meanPoint = ot.Point(1)
meanPoint[0] = 1.0
sigma = ot.Point(1)
sigma[0] = 1.0
R = ot.CorrelationMatrix(1)
distribution = ot.Normal(meanPoint, sigma, R)
print("Distribution ", repr(distribution))
# We try to set an erroneous covariance matrix (wrong dimension) into
# distribution
try:
newR = ot.CorrelationMatrix(2)
distribution.setR(newR)
raise
except Exception:
pass
|