Questions tagged [scipy]
SciPy is a Python-based ecosystem of open-source software for mathematics, science, and engineering.
278 questions
3 votes
1 answer
68 views
M2M in python using SciPy.sph_harm_y
I’m implementing a 3D Laplace Fast Multipole Method in Python and I’m trying to validate my P2M, potential evaluation, and M2M steps against direct summation. P2M + evaluation agree with direct ...
0 votes
0 answers
59 views
More accurate ways to approximate a Finite Fourier Sine Transform?
I'm reading through this research paper, and from section 2, I have deduced that the Finite Fourier Sine Transform along $0\le x\le L_x$ is formulated as $$F(m) = \frac{2}{L_x}\int_0^{L_x} f(x) \sin\...
2 votes
0 answers
84 views
A python code for the translation of a multipole expansion
I'm trying to implement the Fast Multipole Method (FMM) based on the "Short Course on the Fast Multipole Method" by Beatson and Greengard. My goal is to accurately compute Coulomb ...
3 votes
0 answers
90 views
Scipy Hankel Transform with FFTLog algorithm gives wrong result
I'm trying to use Scipy's Fast Inverse Hanekl Transform function (ifht) on some very simple functions, yet it gives completely wrong results. As an example, I want ...
1 vote
1 answer
211 views
Which state-of-the-art ODE solver can handle very high-dimensional systems?
Problem I am currently trying to solve a very high dimensional ODE of the form $\dot y = f(y)$ on $[0,1]$. Mathematically, my ODE makes sense in a discrete range of dimensions $\{d_0, d_1, d_2, \dots\}...
0 votes
0 answers
79 views
How to decrease the error for the solution of my high dimensional ode?
I am dealing with a very high dimensional (think thousands of dimensions) non-linear (not even Lipschitz) ode system. I am experiencing some phenomenon which I am trying to explain by means of an ...
2 votes
1 answer
85 views
scipy minimize gives 0 minimum for unbounded problem
I was trying out the minimize function from scipy ...
0 votes
0 answers
106 views
High precision minimizer
I need a minimizer that works well with high precision. I am currently doing all calculations with mp math to handle the high precision, and am then using a minimizer in scipy where the objective ...
3 votes
1 answer
97 views
Mathematical operation of scipy.signal.order_filter
I am intending to use the order_filter from scipy.signal in a project of mine. But I am not able to understand mathematically ...
0 votes
0 answers
486 views
Warning in curve_fit "Covariance of the parameters could not be estimated"
While fitting the energy spectrum of cobalt for two distinct peaks I am not getting fit parameters and receiving the warning: warnings.warn('Covariance of the parameters could not be estimated'). I'm ...
3 votes
3 answers
1k views
10th-order Runge-Kutta Method
I want to apply the 10th-order Runge-Kutta method, but I am having trouble finding the coefficients. I read Ernst Hairer's article, he used the stage s=17 and ...
1 vote
1 answer
378 views
Preconditioner Implementation with matrix-free methods (sparse iterative solvers)
How can I define preconditioners (SPILU, SPAI, etc.) for sparse iterative methods (TFQMR, GMRES, CGS, etc.) for the matrix-free left-hand side? I defined $Ax=b$ using matrix-free $A$ (with ...
0 votes
0 answers
88 views
Solve beam equation with elastic term using scipy solve_bvp
I want to solve the beam equation with distributed load and elatic term (which depends on how much the beam interact with the terrain) : $$ EI\frac{d^4w}{dx^4}+k*(w(x)-t(x))=q(x) $$ where $q(x)$ is a ...
1 vote
1 answer
1k views
How to run scipy.optimize.minimize with L-BFGS-B for maxiter (completely)
I want to run the below code for maxiter = 20001. I don't want it to stop by some default criteria. ...
0 votes
1 answer
169 views
BSplines from scipy not defined on whole range of the knots
I am looking at the construction of BSplines out of curiosity. I created a small code that uses scipy.interpolate.BSpline to create basic splines. I get the following basic splines for order 0, 1 and ...