scientific-computing Questions

2

Solved

I'm trying to simulate a simple diffusion based on Fick's 2nd law. from pylab import * import numpy as np gridpoints = 128 def profile(x): range = 2. straggle = .1576 dose = 1 return dose/(s...

1

Solve_ivp is an initial value problem solver function from Scipy. In a few words scipy.integrate.solve_ivp(fun, t_span, y0, method=’RK45’, t_eval=None, dense_output=False, events=None, vectorized=...
Frazier asked 18/2, 2020 at 9:48

5

Solved

I am trying to write a unittest to check the output of an engineering analysis. I have theoretical values which i want to check against the analysis to a certain number of significant figures. so, ...
Chiu asked 28/10, 2013 at 20:5

6

Solved

Is there a standard function for Python which outputs True or False probabilistically based on the input of a random number from 0 to 1? example of what I mean: def decision(probability): ...cod...
Informal asked 4/5, 2011 at 16:52

2

Solved

Is there a built-in function in scipy/numpy for getting the PMF of a Multinomial? I'm not sure if binom generalizes in the correct way, e.g. # Attempt to define multinomial with n = 10, p = [0.1, ...
Pneumatophore asked 16/12, 2012 at 17:51

6

I think that Haskell is a beautiful language, and judging by the benchmarks, its implementations can generate fast code. However, I am wondering if it is appropriate for long-running applications...

2

Solved

I'm writing a large number of small datasets to an HDF5 file, and the resulting filesize is about 10x what I would expect from a naive tabulation of the data I'm putting in. My data is organized hi...
Yttriferous asked 15/1, 2013 at 6:24

5

Solved

I need the Python / Numpy equivalent of Matlab (Octave) discrete Laplacian operator (function) del2(). I tried couple Python solutions, none of which seem to match the output of del2. On Octave I h...
Leastwise asked 14/1, 2011 at 14:41

3

Solved

I have received several recommendations to use virtualenv to clean up my python modules. I am concerned because it seems too good to be true. Has anyone found downside related to performance or mem...
Zamudio asked 21/3, 2013 at 6:10

3

Solved

The gaussian_kde function in scipy.stats has a function evaluate that can returns the value of the PDF of an input point. I'm trying to use gaussian_kde to estimate the inverse CDF. The motivation ...
Charinile asked 21/11, 2017 at 16:28

2

Solved

As a biology undergrad i'm often writing python software in order to do some data analysis. The general structure is always : There is some data to load, perform analysis on (statistics, clusterin...
Widner asked 8/7, 2013 at 8:53

3

I'm doing some extensive scientific python calculations and whant to know execution time and memory footprint of python script. So how to get peak memory usage of python script? If it matters I'm...
Two asked 30/10, 2015 at 7:40

2

Solved

I'm researching how to find the inertia for a 2D shape. The contour of this shape is meshed with several points, the x and y coordinate of each point is already known. I know the expression of Ixx...
Caterina asked 11/1, 2017 at 13:19

10

Solved

Is there an open-source alternative to MATLAB's fmincon function for constrained linear optimization? I'm rewriting a MATLAB program to use Python / NumPy / SciPy and this is the only functio...
Deafanddumb asked 8/9, 2008 at 15:19

2

How can I calculate Principal Components Analysis from data in a pandas dataframe?

4

Solved

I would like to lower the time Scipy's odeint takes for solving a differential equation. To practice, I used the example covered in Python in scientific computations as template. Because odeint ...

5

Solved

I have been looking for a python module that implements the common techniques of global optimization (finding the global minimum of a function in N dimensions) without success. If you heard ...
Katherinakatherine asked 19/11, 2010 at 17:11

1

Solved

I have been trying different sparse solvers available in Python 3 and comparing the performance between them and also against Octave and Matlab. I have chosen both direct and iterative approaches, ...

2

Solved

I am trying to implement a series of statistical operations, and I need help vectorizing my code. The idea is to extract NxN patches from two images, the compute a distance metric between these two...
Prebendary asked 7/10, 2020 at 3:4

3

Rather than crawl PubChem's website, I'd prefer to be nice and generate the images locally from the PubChem ftp site: ftp://ftp.ncbi.nih.gov/pubchem/specifications/ The only problem is that I'm ...

1

Although it is known that using nested std::vector to represent matrices is a bad idea, let's use it for now since it is flexible and many existing functions can handle std::vector. I thought, in ...
Spiers asked 1/4, 2020 at 14:19

6

Solved

I'm currently implementing a complex microbial food-web in Python using SciPy.integrate.ode. I need the ability to easily add species and reactions to the system, so I have to code up something qui...
Utley asked 12/1, 2010 at 22:42

1

I was provided two sbatch scripts to submit and run. The input of the second one is based on the output of the first one. The assignment I need to do this for simply tells us to check on the first ...
Egoism asked 7/3, 2020 at 23:48

1

Solved

I am trying to implement to Swing equation for a n-Machine system using Julia. When i run the following code I get this Error Message: LoadError: InexactError: Float64(0.0 + 1.0im) in expression s...
Shorthanded asked 23/1, 2020 at 9:17

2

Solved

I have an input array which is being split up into bins and I want to calculate the mean for those bins. Let's assume the following example: >>> import numpy as np >>> a = np.arr...
Leishmaniasis asked 3/12, 2019 at 17:32

© 2022 - 2024 — McMap. All rights reserved.