Questions tagged [python]
A general purpose high-level programming language that emphasizes ease of code syntax and readability.
6
questions
0
votes
0
answers
38
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 LinearOperator and ...
3
votes
1
answer
545
views
Overflows and underflows in Python
I’m writing some Python code using NumPy. Since I got an overflow warning, I decided to check for underflows as well at all places in the code, using ...
1
vote
1
answer
130
views
Coupled Partial Differential Equations
I'm trying to solve the following system of coupled differential equations, the two-temperature model for $e$ = electrons and $l$ = lattice.
$$
\rho_{e}C_{p,e}\frac{\partial T_{e}}{\partial t} = k_{e}\...
0
votes
1
answer
81
views
optimize this python code that involves matrix inversion
So I have this line of code that involves a matrix inversion
X = A @ B @ np.linalg.pinv(S)
$A$ is an $n$ by $n$ matrix, $B$ is an $n$ by $m$ matrix and $S$ is an $...
1
vote
0
answers
11
views
Guidelines for image detection model for statis sample
I have 20,000 plus images of art (paintings, sculptures, jars, etc). My goal is creating a computer vision model that, from an input (image), identifies the exact same piece of art and returns its id, ...
4
votes
1
answer
103
views
How can I efficiently find an anti-symmetric generator of a special orthogonal matrix?
Given a special orthogonal matrix $O$ (i.e: $OO^T = 1$ and $\det(O) = 1$), I am trying to efficiently find a matrix $X$ such that $O = e^X$ and $X = -X^T$ using Python (NumPy & SciPy).
One obvious ...