Skip to main content

All Questions

Tagged with
6 questions with no upvoted or accepted answers
4 votes
0 answers
3k views

Distance transform on image using NumPy

I would like to find the find the distance transform of a binary image in the fastest way possible without using the scipy function distance_transform_edt(). The ...
user186901's user avatar
4 votes
0 answers
222 views

Finding where column slices of elements in multi-dimensional array are equal

Skippable Intro: I have a dataset that corresponds to an observed time-series. The dataset is organized into a dictionary - which contains an array of years, an array of months, an array of days, an ...
user avatar
4 votes
0 answers
3k views

Reducing memory consumption for Numpy array

I'm running the following code using numpy arrays, I get a MemoryError in Ubuntu, while the same code runs on Mac OSX. (Pagination is automatically setup in Mac) This process consumes around 30 GB. ...
gogasca's user avatar
  • 599
3 votes
0 answers
543 views

Locality Sensitive Hash (similar to k-Nearest Neighbor), in Python+Numpy

I've tried implementing Locality Sensitive Hash, the algorithm that helps recommendation engines, and powers apps like Shazzam that can identify songs you heard at restaurants. LSH is supposed to run ...
Josh.F's user avatar
  • 187
2 votes
0 answers
74 views

backward induction algorithm computation

Is there a way to significantly speed-up this code? I'm solving a dynamic programming model using a backward induction algorithm. A crucial step is to calculate the current-period value function (VF), ...
manifold's user avatar
  • 121
2 votes
0 answers
140 views

Convolution layer using numpy in python

I'm trying to make a CNN in python using numpy. I have a finished product but it seems that it can be improved. On testing the convolutional layer is the biggest bottleneck ...
Rohith's user avatar
  • 21