Skip to main content

Questions tagged [sympy]

SymPy is an open source Python library for symbolic mathematics.

Filter by
Sorted by
Tagged with
6 votes
0 answers

Optimizing SymPy Implementation of prime factorization in form of QUBO

I'm trying to reproduce a paper on Prime Factorization. This paper converts the problem into a QUBO form, which then we can map it to an Ising Minimizer. I've basically done everything and I've ...
Amirhossein Rezaei's user avatar
1 vote
1 answer

Systems of equations solver with sympy

So this is my first Python project and hoped for a bit of feedback. I'm trying to make a little program, where I can insert n equations and run a numerical solve. I ended up using tkinter for the GUI ...
Jonathan's user avatar
1 vote
1 answer

Polynomial calculation in SymPy

Thie programs is written in Sympy 1.9 and it should find a polynomial g of degree dim for a given polynomial ...
miracle173's user avatar
  • 1,336
2 votes
1 answer

Calculate general relativity-related tensors/arrays using metric tensor as input, part 2

I’m new to coding, and for my first project I’m working on a calculator that takes coordinate labels and metric components as input and outputs non-zero components of a number of other tensors (...
kettle corn with a Q U's user avatar
5 votes
2 answers

Calculate general relativity-related tensors/arrays using metric tensor as input

Please be gentle with me-- I just began learning to code a few weeks ago as a hobby in order to support my other hobby of learning general relativity, so this is the first bit of code I've ever ...
kettle corn with a Q U's user avatar
5 votes
1 answer

Sympy reduction of a multivariate, bounded, under-determined system

This is bad. I've been hacking away at Sympy for a few hours and the only solution I've come up with to yield the data I want is brute-force: Code ...
Reinderien's user avatar
  • 62.8k
1 vote
1 answer

Executing Scipy Tensor Product [closed]

Can anyone advise on how to use the SymPy TensorProduct function without having to explicitly indicate the full sequence of objects to take the product of. Below (for the simple case N=3) you can see ...
John Doe's user avatar
  • 113
2 votes
0 answers

quaternion renormalization

Edit 1: changed a few portions of the code to hopefully make it runnable code and more understandable. If something is still incorrect please let me know. Edit 2: just remembered I am doing this in ...
Boto's user avatar
  • 29
27 votes
2 answers

Inverse transform sampling

Inverse transform sampling is a method to generate random values that follow an arbitrary distribution. For some reason this method was never implemented in any popular scientific libraries. And as I ...
Georgy's user avatar
  • 1,939
14 votes
2 answers

Implementing convolution using SymPy

I started using SymPy recently, and I implemented convolution using it. ...
Itay4's user avatar
  • 175
2 votes
1 answer

Function Plotter GUI in Tkinter and Matplotlib

I have been working on plotting time varying functions in Python as my most recent project, and would love input on optimization, proper Tkinter form, and anything that stands out like a sore thumb. ...
logical123's user avatar
9 votes
1 answer

Fitting multiple piecewise functions to data and return functions and derivatives as Fortran code

Background For a future workshop I'll have to fit arbitrary functions (independent variable is height z) to data from multiple sources (output of different ...
StefanS's user avatar
  • 143
5 votes
1 answer

Reliability polynomial calculation

The reliability polynomial (specifically, the all-terminal reliability polynomial) is, given a value \$0 \le p \le 1\$, outputs the probability that a given graph \$G\$ is connected. Note: at the ...
Ryan Dougherty's user avatar
6 votes
2 answers

Math, Geometry, & Physics Library

I am making a Python program that does math and physics calculations for you. This is my first programming project and is a work in progress. The SymPy library was used for some portion of it. ...
user avatar