# Questions tagged [python]

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

898 questions
Filter by
Sorted by
Tagged with
23 views

### Questions on the theory of distributed numerical algebraic computation

I'm trying to build a pure python distributed numerical algebra computation kernel based on GPU. but after I've learnt most of the software engineering, I realise that I'm seriously lacking in ...
1 vote
44 views

### Improvement to naive gradient descent implementation for the Thomson problem

I have a Python program (available on github) that uses naive gradient descent to find approximate solutions to the Thomson Problem. It works surprisingly well, but I've been wondering if there's a ...
1 vote
59 views

### Calculating Madelung constant via Ewald summation

I am attempting to calculate the Madelung constant for NaCl using an Ewald sum derived by Nijboer. There are other methods and published codes to do this, but I am specifically interested in working ...
33 views

...
21 views

### Plotting ground Tracks with Python only using trigonometry

I'm currently studying aerospace engineering, and I'm attempting to create a ground track plot in Python using data from a TLE file. I'm doing this without relying on explicit packages like AstroPy or ...
1 vote
18 views

### numerical calculation of haldane model arm chair edge states

hello I am trying to numerical simulate the band structure of the one-dimensional periodic arm chair edge states, I use the pybinding model to construct and ...
41 views

### Nanograd differentation; what is going inside the python code

I am reading up on deep learning and I am trying to understand the backpropagation methods in python nanograd. See; https://github.com/rasmusbergpalm/nanograd This is a method for computing the ...
57 views

1 vote
52 views

### Possible bug with scipy.optimize SHGO sobol: TypeError: <lambda>() takes 1 positional argument but 3 were given

I have been trying to perform some global optimization with SciPy optimizer SHGO and I've had issues with the sampling method 'sobol'. Specifically, I get an error ...
88 views

36 views

### What is meant exactly by the domains in this context and how can I simulate their size?

I was working on a problem from "Computational Physics using python: Chapter 17." The problem is concerned with simulating the thermodynamics behind the spin of electrons and the resulting ...
69 views

### Deviation between Analytic DFT and FFT in Python

Within my work, I am trying to compare analytically retrieved power spectra with ones calculated from fft packages in python. The problem I have, is that the analytic form of the peaks I derived does ...
326 views

### Time and memory required to diagonalize a 18000 by 18000 matrix using numpy in python

Can someone give an estimate of the Time and memory required to diagonalize a 20000 by 20000 complex hermitian matrix using numpy in python ?
1 vote
90 views

### Solving 2D Poisson equation with mixed boundary conditions in Python

I am trying to numerically solve the Poisson's equation $$u_{xx} + u_{yy} = - \cos(x) \quad \text{if} - \pi/2 \leq x \leq \pi/2 \quad \text{0 otherwise}$$ The domain is the rectangle with vertices ...
110 views

53 views

### Solving Laplace for Velocity Potential in Constricted Channel

I am trying to solve the 2D Laplace equation numerically to give the velocity potential of a fluid flowing in a channel with a constriction: $u_{xx}+u_{yy}=0$ There is a constriction in the channel at ...
86 views

134 views

### Solve 1st order ODE in using scipy

I've been trying to solve the following equation $$y(t)=-A\cdot\frac{\mathrm{d} y}{\mathrm{d} t}+B\cdot\left(\frac{\mathrm{d} y}{\mathrm{d} t}\right)^{2}+C \\ y(t=0)=y_{0}\\$$ where $A$, $B$, and $C$...
I have an operator $H$. I express $H$ as a matrix in the orthonormalized $\{ |e > \}$ basis. Then I diagonalize it to obtain eigenvalues, let's say for example $H$ is $6 \times 6$ and the ...