# Questions tagged [python]

A general purpose high-level programming language that emphasizes ease of code syntax and readability.

737 questions
Filter by
Sorted by
Tagged with
131 views

### Evaluate 3D Shape Descriptor

I'm trying to create my own 3d shape descriptor, the idea is that how I may evaluate how much my descriptor is well and good? What I checked is that they evaluate descriptors through shape matching, ...
6k views

### Solving coupled differential equations in Python, 2nd order

I have a system of coupled differential equations, one of which is second-order. I am looking for a way to solve them in Python. I would be extremely grateful for any advice on how can I do that! $k$...
54 views

### How do I graph this in python? [closed]

$$y=\cases{-\sqrt{|x|}, \quad x\le0\\\sqrt{x}, \quad x>0}$$ I've tried graphing this in python, but can't seem to figure it out. Does anyone know how to do this by chance?
122 views

1k views

### Runge-Kutta in the presence of an attractor

Suppose you are solving a system of equations numerically that possesses an attractor (no matter the initial conditions set, all the different solutions will approach a specific set of values that ...
172 views

### fastest way to compute many small dot products

I have two n-by-3 blocks contiguous in memory ("n vectors of length 3") and I'd like to compute the dot product between each of the rows as fast as possible. In numpy, using ...
639 views

### How to obtain only the value of my variable using scipy.optimize.minimize

when I minimize a function using scipy.optimize.minimize I get a big list of things as a result, but I would like to only get the value of my variable, this is my code : ...
66 views

### Attempting to perturb ODE when initial condition is equilibrium point does not work

I have the following system of differential equations: $$x' = ax- cy + e1$$ $$y' = by- dx + e2$$ for variables $x,y$ and parameters $a,b,c,d,e1,e2$. I'd like to solve this in python, which is ...
183 views

### Calculate Transformation Matrix between two sensors

My question is if I can calculate the transformation matrix between two sensors. Each sensor provides a $4\times 4$ matrix for every timestep recorded. The sensors are moving and have some noise in ...
309 views

### Chebyshev differentiation via FFT with a domain [a,b]

I want to ask something about Chebyshev differentiation via FFT, which can be used to obtain with spectral accuracy the derivative of a smooth function. See for instance this code in python, which ...
464 views

### Symmetric sparse direct solvers in scipy

scipy.linalg.solve, in its newer versions, has a parameter assume_a that can be used to specify that the matrix $A$ is symmetric ...
47 views

### How to handle system of chemical reactions for a batch reactor SciPy solver

I have a system of chemical reactions where the rate equations represent a batch reactor model. The model is a system of ODEs which is solved with the SciPy ...
59 views

### Optimal line such that maximum points are between an upper and lower boundary

I have some 2D data and would like to find a line $y = mx + b$ such that a maximum number of points from the data is captured within the area between $y = mx + b + margin$ and $y = mx + b - margin$. ...
2k views

### Numerical derivative in python

I am trying to take the numerical derivative of a dataset. My first attempt was to use the gradient function from numpy but in that case the graph of the derivative ...
2k views

### Getting started with Computational Chemistry

I´m now a chemistry grad student and I feel the need to get involved with computational chemistry and coding in the chemical field (in general). I have a very simple question: What is the best way to ...
158 views

### Do most statistical packages and libraries in high-level programming languages rely on LAPACK for their matrix inversion operations?

Possible an open-ended question, but I am wondering if most statistical packages and libraries, for instance, Stata, R, Python's NumPy and MATLAB rely on LAPACK algorithms to perform matrix operations,...
420 views