All Questions
6
questions
4
votes
2
answers
4k
views
Cython with variable-length arrays
Dynamically growing arrays are a type of array. They are very useful when you don't know the exact size of the array at design time. First you need to define an initial number of elements. (Wikipedia)
...
1
vote
1
answer
183
views
k-armed bandit problem in Python
I implemented k-armed bandit problem in C#, MATLAB and Python. C# and Matlab code run fairly fast (With same settings of T = 2000 and nRun = 1000 the elapsed time is about 6sec). However, the Python ...
16
votes
1
answer
391
views
Solve the phase state between two haplotype blocks using markov transition probabilities
I have spent about more than a year in python, but I come from biology background. I should say I have got some understanding of for-loop and nested-for-loop to workout the solution to the problem I ...
2
votes
2
answers
5k
views
Simulation of 2D elastic balls
Following this SO post and this Wikipedia article, I wrote a Python script to simulate physics of 2D elastic balls.
I define the physical behaviour of each ball in the ...
12
votes
2
answers
17k
views
Generating a 3D Point Cloud
I'm trying to produce a 3D point cloud from a depth image and some camera intrinsics. The image is 640x480, and is a NumPy array of bytes. The output is a (rows * columns) x 3 array of points.
I've ...
7
votes
2
answers
299
views
Taking wind data and simulating future wind profiles
I am new to programming, and am using Python to take wind data and simulate future wind profiles. The code as written takes a while to execute and I was hoping someone could suggest ways to make my ...