Skip to main content

All Questions

Tagged with
0 votes
0 answers
140 views

Algorithm to generate splats from point clouds

I am trying to write a program to generate splats from point clouds from following this paper and this paper. The function I have to generate 1 splat is here: ...
Aayush's user avatar
  • 61
4 votes
1 answer
75 views

Optimising compatibility-conflict graph solution - python recursive routine

Background I'm implementing an algorithm which localises overlapping sound sources using the time-difference-of-arrivals across 3 sensors [1]. Compatible 'triples' (e.g. with only 2 common sensors) ...
Thejasvi's user avatar
  • 143
2 votes
1 answer
412 views

Improving the speed of one-hot encoding a list of strings

I've recently developed two functions to functions to essentially convert a list of strings that look something like this (these strings are 101 characters long in my case): ...
KLM117's user avatar
  • 123
2 votes
1 answer
235 views

Integration loop over multiple doping and temperature levels

I want to perform some calculations on a large dataset. The code can be found below, where I want to calculate the values for 'results_nr' over a large loop (1000 x 910) values. Can you help me out ...
thimoooh's user avatar
1 vote
1 answer
75 views

Generate new column based on two columns of dataframe

I need to generate column a_b based on column a and column b of ...
jaried's user avatar
  • 177
2 votes
1 answer
255 views

Replace nested for loops when assigning intial conditions in a 4-dimensional array

I create a 4-dimensional (x, y, z, t) array of zero values. I then set the initial values at t = Tmax. To do this, I use a nested for loop. I attempted to improve ...
Ruan's user avatar
  • 101
3 votes
1 answer
206 views

Numerical integration in Python involving four dimensions

I'm trying to obtain the following S2 from a given S1, $$ S2(i, j) = \sum _{k=0} ^i \sum _{l=0} ^j S1(k, i-k, j, l) e^{ -\sqrt{...
user16308's user avatar
5 votes
1 answer
929 views

Laser physics simulation

This is for a computation for laser physics. The speed is quite slow, which seems to be delayed a lot by the three nested for loops with indices j,k, and l (with comments below). And the computation ...
user16308's user avatar
1 vote
1 answer
700 views

Exponentially-weighted moving mean and standard deviation of an irregularly-spaced weighted time series

The following numpy/python function computes exponentially-weighted moving mean and standard deviation of an irregularly-spaced weighted time series. I want to make it faster by getting rid of the ...
yuri kilochek's user avatar
1 vote
0 answers
128 views

Solving a linear system with Gaussian Elimination

I decided to implement a solver for linear systems of equations based on the gaussian elimination and reduction to upper triangular form. The gaussian elimination is quite simple to implement but the ...
Caridorc's user avatar
  • 27.5k
4 votes
3 answers
411 views

Pairwise Euclidean distance search algorithm

x and y are two-dimensional arrays with dimensions (AxN) and (BxN), i.e. they have the same number of columns. I need to get a matrix of Euclidean distances between each pair of rows from x and y. I ...
Никита Михалков's user avatar
2 votes
1 answer
208 views

Generating a matrix with each row having normalized weights

I just asked this question over Stack Over Flow on how to improve my code and reposting it here as someone on Stack Overflow recommended this platform. I have written two python functions and they are ...
AulwTheo's user avatar
3 votes
0 answers
66 views

Implementation of a crypto formula in Python

I need to implement in Python the formula in the image. The set B is a set of real numbers \$-1 \le t \le 1\$. Also, \$\mathbb{F}_2\$ is a set with the elements 0 and 1. \$y_i\$ is the \$i\$-th ...
juaninf's user avatar
  • 139
2 votes
0 answers
139 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
1 vote
0 answers
157 views

Computing the angle between two vectors (vectorized) for small angles and with few copies

I am implementing a function that computes the angle between two vectors when given two n-dimensional arrays and an axis along which to operate. I want to do this with as few copies as possible, and ...
FirefoxMetzger's user avatar

15 30 50 per page
1
2
3 4 5
16