Python Polynomial expansion from Python to Mathematica

Click For Summary
The discussion centers around the Python library chaospy, specifically the command cp.orth_ttr, which generates polynomial expansions for random variables such as normal and uniform distributions. The user seeks to replicate this functionality in Mathematica but faces issues with image links and potential errors in their Python code, possibly due to a missing matplotlib module. Responses indicate a lack of knowledge regarding Mathematica solutions, with one participant noting the broken image link and the error in the provided Python code.
confused_engineer
Messages
34
Reaction score
1
Hi everybody.

In Python there is a library called chaospy. One useful command is cp.orth_ttr which generates a polynomial expansion, e. g. a series of orthogonal polynomials or orders zero, one, two... for a random variable e.g normal, uniform...

For more information see https://pypi.python.org/pypi/chaospy/2.0

I use it as shown in the attached image.

Can someone tell me if there exists a way to obtain these same results in Mathematica?https://ibb.co/dEuFQx

Edit: since it seems that the image is not working properly, I also provide a link https://ibb.co/cm2Vsc
 
Technology news on Phys.org
Not sure what your question is. The link to the image doesn't work (as you know) -- my browser says that page doesn't exist. In your other link, your python code has an error, possibly because the matplotlib module hasn't been installed.

If your question is about Mathematica, I'm not knowledgeable to answer that question.
 
Learn If you want to write code for Python Machine learning, AI Statistics/data analysis Scientific research Web application servers Some microcontrollers JavaScript/Node JS/TypeScript Web sites Web application servers C# Games (Unity) Consumer applications (Windows) Business applications C++ Games (Unreal Engine) Operating systems, device drivers Microcontrollers/embedded systems Consumer applications (Linux) Some more tips: Do not learn C++ (or any other dialect of C) as a...

Similar threads

  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 46 ·
2
Replies
46
Views
8K
  • · Replies 4 ·
Replies
4
Views
4K
  • Poll Poll
  • · Replies 1 ·
Replies
1
Views
6K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 7 ·
Replies
7
Views
3K
  • · Replies 13 ·
Replies
13
Views
3K