# Tagged Questions

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

37 views

### NUMERICAL METHODS FOR SOLUTION OF COUPLED DIFFERENTIAL EQUATIONS (STUDY OF Xe-135 REACTOR POISONING)

I'm building a python code to solve couple differential equations governing Iodine - 135 and Xenon - 135 poisoning in nuclear reactor operation. The code is given below. When I run it I get this ...
81 views

### Python environments for AMG and Gauss Seidel as solvers instead of preconditioners

I am working on block preconditioning and seemingly it is common to write customised Krylov solvers for them. Within each solver, the individual block linear system with preconditioners are ...
75 views

### Vectorizing list of different functions for Gradient Descent

I am new to machine learning and statistical analysis and am having trouble figuring how I should go about a problem I have. I believe that I understand the gradient descent algorithm and how it ...
18 views

### Computing 3-term Connection Coefficients for Wavelets

I am trying to calculate the three-term connection coefficients $$Λ_{l,m}^{d_1,d_2,d_3} = ∫_{-∞}^∞ φ^{(d_1)}(x) φ^{(d_2)}_l(x) φ^{(d_3)}_m(x) dx$$ for Daubechies wavelets numerically using Python. ...
48 views

### Meaning of this minimal python and FEniCS based wave propagation code? [closed]

This is a question about understanding a piece of random code that does not necessarily require knowledge of it's theory. This is very specific and may not be of use to the community in general but ...
87 views

23 views

### Efficiently creating an adjacency matrix from a lattice in numpy

I have an $n$ by $m$ numpy array representing a rectangular lattice $L$, where each site contains a one or a zero, representing two different materials. I'm modelling heat flow across this lattice. ...
29 views

### Problem with Levenberg-Marquardt for FEMU case

I m trying to implement a Levenberg-Marquart on python to identify 2 material parameters via Finite Elements calculations and full-field measurements as called FEMU (Finite Elements Model Updating). ...
149 views

### State of the art in parallel data structures

I'm currently evaluating how I could implement several algorithms on a parallel computer with a large number of nodes, each also equipped with a powerful GPU. It turns out that for many algorithms, it ...
46 views

51 views

### Clustering similar words and mapping to numbers in Python

I'm familiar with kmeans to cluster data points, but not text.. So I have one column of words in cvs format, which I want to cluster those which have similar word or more, and then mapping those ...
56 views

### Solving coupled differential equations with multiple independent variables

I am currently using the wrapper odeintw for scipy.integrate.odeint to solve my equations since they are complex-valued. At the moment, I have 3 coupled first-order differential equations with 2 ...
49 views

### Generalized Hermite Function as eigenfunction of a differential operator

I'm going through this paper. The article defines function function $\phi_n^\mu(x)$ that is orthonormal on $L^2$ with measure $dm = dx$: \phi^\mu_n =\left(\frac{\gamma_\mu(n)}{\...
213 views

### Why am I not seeing faster neural network training after upgrading to a vastly better GPU?

I was previously running my neural networks using the Lasagne library to build and train neural networks in Theano on an NVIDIA GTX 750 Ti. I'm using a genetic algorithm to tune the hyperparameters of ...
48 views

### Very long running time for Haase and Muller (2014) coded in Python + Gurobi

I have read the paper of Haase and Muller (2014) where they present the linear reformulations of the multinomial logit choice probabilities and compare different approaches. I have tried for an ...
60 views

### Repeated 1d minimization with similar parameters (scipy)

I have a function f(x,k1,k2) and I am trying to minimize it over x for different values of ...
51 views

### Probability of reconstructing a word using c substrings from a random sample

Consider a voice recording split into it's phonemes as our sample $S=(s_1,...,s_k) \in \Omega = P^k$. The number of phonemes is $|P| = 40$. Then I have a word $w = (w_1,...,w_n) \in P^n$. I want to ...
21 views

### petsc4py: AttributeError for Mat.createBAIJ method

I am trying to experiment how to set up a block linear system using the petsc4py port in fenics. Although there is no documentation available, I suppose BAIJ method should be a means to create a ...
50 views

### Common nodes in two FEM grids

There are two independent tetrahedral FEM grids. Second grid is subset of the first. By subset, I mean: nodes from the second grid are exactly in the same positions as some nodes from the first grid. ...
136 views

### How to Solve an Integral Equation for an Unknown Integrand numericlaly?

I am working on an astrophysical research in which we relate the cumulative number of Damped Lyman Alpha HI clouds/galaxies, namely their number densities, $\frac{dN_{DLA}}{dz}(>M, z=0),$ to the ...
553 views

### What determines the usual chemistry textbook plots of atom orbitals?

In elementary chemistry textbooks you often have pictures like the following one: Are there any conventions how to get them? I am not sure, but I guess that it are contour plots with only one iso-...
52 views

### How to make scatter plots of scalar fields with free software?

How can I make a scatter plot like the following, where the density of points represents the magnitude of the scalar field at that point. Consider for example the probability density for an atom: I ...
173 views

### What is the currently recommended way to install the SciPy ecosystem on OS X?

I just got a new Macbook and decided to install everything from scratch instead of migrating. Previously I've always installed SciPy etc. through MacPorts, but lately MacPorts as a whole seems not to ...
168 views

### Python Pandas / Numpy indexing faster than np.where between 2 arrays [closed]

I have 2 pandas datasets which have 'RF' field in common. The optionsdata variable is ~60K, which map to at most the histdata ...
60 views

### How to create a phase diagram using yt for python?

I'm trying to use yt to create a phase diagram in Python. I have three variables that I will call X,Y,Z from which I have a discrete set of triplets of values (x,y,z). I want to plot for each of these ...
98 views

### Addition and subtraction of two floats in Python

Yesterday I was wondering how floats are handled in a computer and what they look like in binary... I learnt about the single-precision floating-point and I tried to see the limit of that format... I ...
178 views

### Simulate electric fields due to surface charges in simple circuits using python

I want to simulate the electric fields in simple circuits using Python and only free software. My first goal is to reproduce the images given in (1) which are made by the commercial ANSYS Maxwell ...
209 views

99 views

### How to read the number of periods of this complicated graph?

I have two data sets that are quasi-periodic. They have the same period and can be seen clearly by eye. For example when $x\in(100,200)$, both of them have about 32 periods. Below is a zoom-in of ...
35 views

### How to use compiled python packages for matrix initialization

Assume I have an expression for an matrix initialization, for example the following: A[i,i-2*j+k] = B[i-k] * C[i] * D[i+j+k] In order to execute such a process, I could loop over all i, j and k. ...
136 views

### Finite-difference approximation of the 2nd derivative operator matrix for a staggered grid

I'm working on a computational physics assignment and I was looking for some help as I've got stuck! The question is: Write a function to create the finite-difference approximation of the 2nd ...
112 views

### Is it worth switching to timesteppers provided by PETSc if I can't write down a Jacobian for my problem? Case study with “the amoeba” toy problem

I am considering using petsc4py instead of scipy.integrate.odeint (which is a wrapper for Fortran solvers) for a problem ...
332 views

### Multiple Coupled Differential Equation solution in Python

I have 4 ordinary differential equations that are coupled. The variables in the 4 equations are functions of time and space and one of them is second order in space. \frac{ \partial ...
184 views

### Heat Equation - PDE

I'm trying to model the Black-Scholes Equation (transformed into a heat equation) using method of lines in Python. The transformed formula is basically \begin{equation*} \frac{\partial u}{\partial ...
118 views

### Inverse quadratic method only makes one iteration - python

I'm tryin' to implement this method with python3 but i don't solve the problem. This is my code: ...
89 views

### How to separate text from the paper on a black and white page?

I tried to discretize an image into black and white and came into some difficult. The difference between the letters and paper is pretty clear to our eyes: However a simple thresholding trick ...
I'm trying to solve the following first order hyperbolic PDE problem using method of lines: Hyperbolic Equation: $u_t = -u_x$ with initial condition: $u(0,x) = 0, 0 < x < 1$ ...