# Python usage

**URL:** https://openturns.discourse.group/c/python/9.md?page=2

[Latest](https://openturns.discourse.group/latest.md) · [Categories](https://openturns.discourse.group/categories.md) · [Tags](https://openturns.discourse.group/tags.md)

**Page:** 3

---

## [Problem while using RandomWalkMetropolisHastings](https://openturns.discourse.group/t/problem-while-using-randomwalkmetropolishastings/196)

<div class="topic-metadata">

**Author:** [@sanaaZ](https://openturns.discourse.group/u/sanaaZ)\
**Replies:** 1\
**Last updated:** [March 25, 2022, 9:36pm UTC](https://openturns.discourse.group/t/problem-while-using-randomwalkmetropolishastings/196 "2022-03-25T21:36:19Z")

</div>

hello i’ve tried running the official examples on the RandomWalkMetropolisHastings and none of them would work. i kept getting this error : TypeError: Wrong number or type of arguments for overloaded function 'new\_Rand…

---

## [Generate multivariate joint distribution](https://openturns.discourse.group/t/generate-multivariate-joint-distribution/182)

<div class="topic-metadata">

**Author:** [@XavierFaure](https://openturns.discourse.group/u/XavierFaure)\
**Replies:** 8\
**Last updated:** [March 14, 2022, 8:12am UTC](https://openturns.discourse.group/t/generate-multivariate-joint-distribution/182 "2022-03-14T08:12:49Z")

</div>

Dear all, I am trying to implement a method that generates a new sample of several parameters being linked in a multivariate joint distribution. A bit of more details : I get, out of an other process, a matrix n \\times…

---

## [Calculations in LinearLeastSquaresCalibration are run before the .run() call](https://openturns.discourse.group/t/calculations-in-linearleastsquarescalibration-are-run-before-the-run-call/128)

<div class="topic-metadata">

**Author:** [@sanaaZ](https://openturns.discourse.group/u/sanaaZ)\
**Replies:** 1\
**Last updated:** [June 24, 2021, 10:13am UTC](https://openturns.discourse.group/t/calculations-in-linearleastsquarescalibration-are-run-before-the-run-call/128 "2021-06-24T10:13:51Z")

</div>

Hello, I would like some clarification on the use of the LinearLeastSquaresCalibration class. I’ve noticed that the calculations were run as soon as an object was instantiated, whereas i would have expected them to be w…

---

## [Gradient and Hessian for polynomial chaos metamodels](https://openturns.discourse.group/t/gradient-and-hessian-for-polynomial-chaos-metamodels/177)

<div class="topic-metadata">

**Author:** [@fabdlhm](https://openturns.discourse.group/u/fabdlhm)\
**Replies:** 2\
**Last updated:** [February 10, 2022, 3:46pm UTC](https://openturns.discourse.group/t/gradient-and-hessian-for-polynomial-chaos-metamodels/177 "2022-02-10T15:46:27Z")

</div>

Hi, i have constructed a polynomial chaos metamodel of a function with input dimension dx and output dimension dy, and i would like to evaluate the gradient of this metamodel in a vectorized way, i.e. for an input array…

---

## [Stochastic calibration](https://openturns.discourse.group/t/stochastic-calibration/174)

<div class="topic-metadata">

**Author:** [@GPSalachs](https://openturns.discourse.group/u/GPSalachs)\
**Replies:** 1\
**Last updated:** [January 23, 2022, 10:34am UTC](https://openturns.discourse.group/t/stochastic-calibration/174 "2022-01-23T10:34:11Z")

</div>

Hello and Happy new Year! I would like to know if it is possible to calibrate measurements defined with input variables and results (outputs) against a second set of measurements that only have results (outputs). Would …

---

## [Metamodels : way to save or store?](https://openturns.discourse.group/t/metamodels-way-to-save-or-store/176)

<div class="topic-metadata">

**Author:** [@Flore](https://openturns.discourse.group/u/Flore)\
**Replies:** 1\
**Last updated:** [January 14, 2022, 1:00pm UTC](https://openturns.discourse.group/t/metamodels-way-to-save-or-store/176 "2022-01-14T13:00:51Z")

</div>

Hello First of all : i wish you an happy new year ! Secondly I wonder if I can save / store metamodels after they have been built Because I currently build metamodels that are very long to build and after that I will …

---

## [Kriging metamodel for vector-valued models](https://openturns.discourse.group/t/kriging-metamodel-for-vector-valued-models/171)

<div class="topic-metadata">

**Author:** [@fabdlhm](https://openturns.discourse.group/u/fabdlhm)\
**Replies:** 2\
**Last updated:** [December 15, 2021, 6:03pm UTC](https://openturns.discourse.group/t/kriging-metamodel-for-vector-valued-models/171 "2021-12-15T18:03:34Z")

</div>

Hello, I would like to build a Kriging metamodel of a vector-valued model (say, a map from \\mathbb{R}^d to \\mathbb{R}^n) by constructing an independent Kriging metamodel for each model component, with common experimenta…

---

## [An OpenTURNS cheat sheet](https://openturns.discourse.group/t/an-openturns-cheat-sheet/172)

<div class="topic-metadata">

**Author:** [@MichaelBaudin](https://openturns.discourse.group/u/MichaelBaudin)\
**Replies:** 0\
**Last updated:** [December 9, 2021, 6:52pm UTC](https://openturns.discourse.group/t/an-openturns-cheat-sheet/172 "2021-12-09T18:52:23Z")

</div>

Hi! In practice, I often face situations where I use the same classes and methods over and over, but am unable to remember the exact name or syntax. This makes the development of Python scripts a lot slower, because I h…

---

## [A graph for monitoring the convergence of an estimator](https://openturns.discourse.group/t/a-graph-for-monitoring-the-convergence-of-an-estimator/53)

<div class="topic-metadata">

**Author:** [@sanaaZ](https://openturns.discourse.group/u/sanaaZ)\
**Replies:** 2\
**Last updated:** [December 3, 2020, 1:33pm UTC](https://openturns.discourse.group/t/a-graph-for-monitoring-the-convergence-of-an-estimator/53 "2020-12-03T13:33:21Z")

</div>

hello, I had to produce the enclosed graph for a study. I think that it could be useful to be able to create them easily within OT, maybe in the bootstrap class?

---

## [Error while generating Morris experiment](https://openturns.discourse.group/t/error-while-generating-morris-experiment/158)

<div class="topic-metadata">

**Author:** [@Flore](https://openturns.discourse.group/u/Flore)\
**Replies:** 7\
**Last updated:** [October 4, 2021, 1:19pm UTC](https://openturns.discourse.group/t/error-while-generating-morris-experiment/158 "2021-10-04T13:19:03Z")

</div>

Hi I encountered a bug with otmorris modul I use openturns v1.17 and otmorris v0.10 I have about 40 input parameters in my model first I managed to generate a Morris experiment with level=4 for each input I specify …

---

## [Wilks quantile in OpenTURNS](https://openturns.discourse.group/t/wilks-quantile-in-openturns/52)

<div class="topic-metadata">

**Author:** [@sanaaZ](https://openturns.discourse.group/u/sanaaZ)\
**Replies:** 10\
**Last updated:** [September 19, 2021, 9:20pm UTC](https://openturns.discourse.group/t/wilks-quantile-in-openturns/52 "2021-09-19T21:20:28Z")

</div>

hello! i’ve had some trouble using the Wilks method in OpenTURNS. It actually works on a RandomVector object, whereas i already had my Sample over which i wanted the calculation to be performed. One workaround would be…

---

## [CSV Openturns Kriging](https://openturns.discourse.group/t/csv-openturns-kriging/154)

<div class="topic-metadata">

**Author:** [@ericmoon](https://openturns.discourse.group/u/ericmoon)\
**Replies:** 12\
**Last updated:** [September 15, 2021, 8:37am UTC](https://openturns.discourse.group/t/csv-openturns-kriging/154 "2021-09-15T08:37:31Z")

</div>

Dear all, I have a csv file with three columns. the first two being x and y coordinates, the third column is my observation at specific location. here is a sample csv of my data: samplecsv.csv (2.8 KB) I want to per…

---

## [Gradient and evaluation](https://openturns.discourse.group/t/gradient-and-evaluation/155)

<div class="topic-metadata">

**Author:** [@MichaelBaudin](https://openturns.discourse.group/u/MichaelBaudin)\
**Replies:** 0\
**Last updated:** [September 6, 2021, 1:11pm UTC](https://openturns.discourse.group/t/gradient-and-evaluation/155 "2021-09-06T13:11:41Z")

</div>

Hi all! I have two questions related to the usage of functions. The first topic is the way to evaluate the gradient. The script: import openturns as ot x = \[72.e9, 3e2, 2.5, 1.5e-7\] g = ot.SymbolicFunction(\["E", "F", …

---

## [Point == None crashes my kernel](https://openturns.discourse.group/t/point-none-crashes-my-kernel/149)

<div class="topic-metadata">

**Author:** [@sanaaZ](https://openturns.discourse.group/u/sanaaZ)\
**Replies:** 1\
**Last updated:** [June 16, 2021, 4:19pm UTC](https://openturns.discourse.group/t/point-none-crashes-my-kernel/149 "2021-06-16T16:19:20Z")

</div>

Hello, i’ve encountered a somewhat weird problem. In my code i had to check if one specific argument was provided by the user, so i did something in these lines : import openturns openturns.Point(\[1,1,1\]) == None this…

---

## [Setting the scale on a Composed Distribution graph](https://openturns.discourse.group/t/setting-the-scale-on-a-composed-distribution-graph/131)

<div class="topic-metadata">

**Author:** [@jamie](https://openturns.discourse.group/u/jamie)\
**Replies:** 7\
**Last updated:** [June 15, 2021, 7:44am UTC](https://openturns.discourse.group/t/setting-the-scale-on-a-composed-distribution-graph/131 "2021-06-15T07:44:26Z")

</div>

Hi. I am pretty new to OT so if this is a stupid question with an easy fix sorry. I am currently creating a set of graphs using ot.ComposedDistribution. This graph is showing the correlation between a number of input var…

---

## [Understanding the getParameterPosterior method in a calibration setting - the dirac case](https://openturns.discourse.group/t/understanding-the-getparameterposterior-method-in-a-calibration-setting-the-dirac-case/140)

<div class="topic-metadata">

**Author:** [@sanaaZ](https://openturns.discourse.group/u/sanaaZ)\
**Replies:** 11\
**Last updated:** [June 4, 2021, 11:53am UTC](https://openturns.discourse.group/t/understanding-the-getparameterposterior-method-in-a-calibration-setting-the-dirac-case/140 "2021-06-04T11:53:19Z")

</div>

Hello I’ve had some trouble using and understanding the method getParameterPosterior when called over a a calibration object. I don’t understand when is it supposed to returns a Dirac distribution and when it is suppose…

---

## [Help with reading in experimental data (text or CSV file)](https://openturns.discourse.group/t/help-with-reading-in-experimental-data-text-or-csv-file/135)

<div class="topic-metadata">

**Author:** [@rollett3785](https://openturns.discourse.group/u/rollett3785)\
**Replies:** 4\
**Last updated:** [May 28, 2021, 5:56am UTC](https://openturns.discourse.group/t/help-with-reading-in-experimental-data-text-or-csv-file/135 "2021-05-28T05:56:06Z")

</div>

Greetings – I am struggling with figuring out how to read in a multi-column dataset (no header line), select a particular column of values, and apply extreme value (GEV, GPD) analysis to that column. Even better, I woul…

---

## [Frozen inputs for calibration not really frozen](https://openturns.discourse.group/t/frozen-inputs-for-calibration-not-really-frozen/136)

<div class="topic-metadata">

**Author:** [@sanaaZ](https://openturns.discourse.group/u/sanaaZ)\
**Replies:** 6\
**Last updated:** [May 27, 2021, 9:46am UTC](https://openturns.discourse.group/t/frozen-inputs-for-calibration-not-really-frozen/136 "2021-05-27T09:46:46Z")

</div>

logistic\_calage.py (5.0 KB) Hi everyone, I have a calibration problem which resemble a lot the one described in the logistic calibration example in the Openturns documentation Only i have had some trouble using Opentu…

---

## [How should i memoize my function in a calibration setting?](https://openturns.discourse.group/t/how-should-i-memoize-my-function-in-a-calibration-setting/129)

<div class="topic-metadata">

**Author:** [@sanaaZ](https://openturns.discourse.group/u/sanaaZ)\
**Replies:** 4\
**Last updated:** [May 25, 2021, 9:57am UTC](https://openturns.discourse.group/t/how-should-i-memoize-my-function-in-a-calibration-setting/129 "2021-05-25T09:57:49Z")

</div>

memoization\_calage.py (797 Bytes) Hello, I would like to use the OpenTurns MemoizeFunction class in a calibration context. I have no idea what I am doing wrong but it doesn’t seems to be working :frowning: I’ve includ…

---

## [How to distribute a computer simulation model wrapper?](https://openturns.discourse.group/t/how-to-distribute-a-computer-simulation-model-wrapper/86)

<div class="topic-metadata">

**Author:** [@efekhari27](https://openturns.discourse.group/u/efekhari27)\
**Replies:** 6\
**Last updated:** [May 11, 2021, 2:48pm UTC](https://openturns.discourse.group/t/how-to-distribute-a-computer-simulation-model-wrapper/86 "2021-05-11T14:48:47Z")

</div>

Hi everyone, I am looking for efficient ways to wrap a computer simulation model in order to perform uncertainty quantification on it. More precisely, my numerical model uses input files containing input variables, afte…

---

## [Data from CSV file workflow](https://openturns.discourse.group/t/data-from-csv-file-workflow/108)

<div class="topic-metadata">

**Author:** [@GPSalachs](https://openturns.discourse.group/u/GPSalachs)\
**Replies:** 20\
**Last updated:** [May 10, 2021, 2:41pm UTC](https://openturns.discourse.group/t/data-from-csv-file-workflow/108 "2021-05-10T14:41:26Z")

</div>

Hello, i have a csv file that is made from a DOE using the OpenTurns GUI of Salome Meca. Now i have done different things with the study in Salome Meca but i cannot find the option to change and export the validation re…

---

## [Can SymbolicFunction be parallelized?](https://openturns.discourse.group/t/can-symbolicfunction-be-parallelized/124)

<div class="topic-metadata">

**Author:** [@efekhari27](https://openturns.discourse.group/u/efekhari27)\
**Replies:** 3\
**Last updated:** [May 3, 2021, 7:52am UTC](https://openturns.discourse.group/t/can-symbolicfunction-be-parallelized/124 "2021-05-03T07:52:56Z")

</div>

This post summarizes an interesting discussion from the OpenTUNRS Gitter thread. In order to get a reference value for complicated toy-cases, a large Monte Carlo simulation is often the most reliable method (order of 10…

---

## [Otmorris - sensitivity from imported full factorial design](https://openturns.discourse.group/t/otmorris-sensitivity-from-imported-full-factorial-design/110)

<div class="topic-metadata">

**Author:** [@gblondet](https://openturns.discourse.group/u/gblondet)\
**Replies:** 4\
**Last updated:** [April 13, 2021, 1:36pm UTC](https://openturns.discourse.group/t/otmorris-sensitivity-from-imported-full-factorial-design/110 "2021-04-13T13:36:37Z")

</div>

Hello, I would like to know if it is possible to import a full factorial DoE with results and run a Morris sensitivity analysis on it. I think it may be, since each point of the grid is evaluated, and the last thing to …

---

## [Questions diverses sur l'utilisation openturns](https://openturns.discourse.group/t/questions-diverses-sur-lutilisation-openturns/64)

<div class="topic-metadata">

**Author:** [@Flore](https://openturns.discourse.group/u/Flore)\
**Replies:** 1\
**Last updated:** [March 21, 2021, 2:39pm UTC](https://openturns.discourse.group/t/questions-diverses-sur-lutilisation-openturns/64 "2021-03-21T14:39:21Z")

</div>

Bonjour Je suis une nouvelle utilisatrice d’OpenTurns. Je me suis définie un cas d’étude (simulation en 2D faisant appel à un logiciel interne), j’ai paramétré ce cas, j’ai défini le script python qui permet de générer …

---

## [Diagonals of a Matrix](https://openturns.discourse.group/t/diagonals-of-a-matrix/105)

<div class="topic-metadata">

**Author:** [@MichaelBaudin](https://openturns.discourse.group/u/MichaelBaudin)\
**Replies:** 1\
**Last updated:** [March 18, 2021, 6:20pm UTC](https://openturns.discourse.group/t/diagonals-of-a-matrix/105 "2021-03-18T18:20:26Z")

</div>

Hi! Working with @JPelamatti and @vchabri on the development of a new feature for HSIC indices, we have a small issue at porting some code from numpy matrices to OpenTURNS matrices. The following code removes the diago…

---

## [Randomly sampling a given number of permutations with ot.KPermutations](https://openturns.discourse.group/t/randomly-sampling-a-given-number-of-permutations-with-ot-kpermutations/98)

<div class="topic-metadata">

**Author:** [@JPelamatti](https://openturns.discourse.group/u/JPelamatti)\
**Replies:** 2\
**Last updated:** [February 22, 2021, 10:01am UTC](https://openturns.discourse.group/t/randomly-sampling-a-given-number-of-permutations-with-ot-kpermutations/98 "2021-02-22T10:01:20Z")

</div>

Hello, I was wondering whether there is way to randomly sample a given number n of permutations of a vector when using the ot.KPermutations class, without having to generate the entire set of permutations. For instance…

---

## [Error while building chao algo](https://openturns.discourse.group/t/error-while-building-chao-algo/84)

<div class="topic-metadata">

**Author:** [@Flore](https://openturns.discourse.group/u/Flore)\
**Replies:** 13\
**Last updated:** [February 20, 2021, 7:07pm UTC](https://openturns.discourse.group/t/error-while-building-chao-algo/84 "2021-02-20T19:07:02Z")

</div>

Hi everyone ! I build a sample from my physics simulation tools. From this sample I would like to build metamodel. I first try a chaos algo. But an error occured and I don’t understand why. I generate my sample with LH…

---

## [Cauchy distribution in OT?](https://openturns.discourse.group/t/cauchy-distribution-in-ot/73)

<div class="topic-metadata">

**Author:** [@MichaelBaudin](https://openturns.discourse.group/u/MichaelBaudin)\
**Replies:** 2\
**Last updated:** [December 13, 2020, 7:04pm UTC](https://openturns.discourse.group/t/cauchy-distribution-in-ot/73 "2020-12-13T19:04:55Z")

</div>

Hi! I would like to perform a Monte-Carlo simulation which fails to converge. To create it, I selected the Cauchy distribution https://en.wikipedia.org/wiki/Cauchy\_distribution. However, I could not find it in the libr…

---

## [Is algebra of random variables commutative?](https://openturns.discourse.group/t/is-algebra-of-random-variables-commutative/72)

<div class="topic-metadata">

**Author:** [@MichaelBaudin](https://openturns.discourse.group/u/MichaelBaudin)\
**Replies:** 3\
**Last updated:** [December 12, 2020, 9:24pm UTC](https://openturns.discourse.group/t/is-algebra-of-random-variables-commutative/72 "2020-12-12T21:24:31Z")

</div>

Hi ! I have a bizarre output from the following script: import openturns as ot u = ot.Uniform(0.0, 1.0) n = ot.Normal(0.0, 1.0) z1 = u \* n z1.setDescription(\["u \* n"\]) graph = z1.drawPDF() z2 = n \* u z2.setDescription(…

---

## [Compute the L2 norm of a Field](https://openturns.discourse.group/t/compute-the-l2-norm-of-a-field/67)

<div class="topic-metadata">

**Author:** [@MichaelBaudin](https://openturns.discourse.group/u/MichaelBaudin)\
**Replies:** 2\
**Last updated:** [December 9, 2020, 10:15am UTC](https://openturns.discourse.group/t/compute-the-l2-norm-of-a-field/67 "2020-12-09T10:15:53Z")

</div>

Hi! We have a Field with index parameter in 2D and scalar value and we want to compute its L^2 norm: \\|X\\|\_{L^2}^2 = \\int\_\\mathcal{D} X(\\omega,{\\bf t})^2 d{\\bf t} Is there a method in OT to compute this? Otherwise, i…

[Previous page](https://openturns.discourse.group/c/python/9.md?page=1)

[Next page](https://openturns.discourse.group/c/python/9.md?page=3)
