All Questions
Tagged with performance numpy
239
questions
4
votes
1
answer
104
views
Dataframe transformation to numpy ndarray takes ages to complete
I would like to transform my dataframe into an array of fixed-sized chunks from each unique segment. Specifically, I would like to transform the ...
2
votes
1
answer
47
views
Removing Loop from Numpy XOR
I have been playing around with numpy and matplotlib.
My little project was to create a scatter plot ranging from -1 to 1 on both X and Y, but where the shading is done with the XOR scheme.
The ...
3
votes
1
answer
820
views
Using Numba works slower than not using it for my Python code
I thought this community is better place to ask my question so I ask here rather than at StackOverflow.
Recently, I learned that Numba can make Python function ...
10
votes
1
answer
329
views
From Hummingbirds to Ornithopters: Simulating the Aerodynamics of Flapping Wings
Ptera Software
A Flapping Wing Aerodynamics Simulator Written in Python
Motivation
About a year ago, I became fascinated by how animals fly. As an aerospace engineering student, it surprised me that ...
2
votes
1
answer
1k
views
Fast brute force numpy array combination
I want to extract the combinations of numpy arrays in this way:
...
2
votes
1
answer
98
views
Performance issue in python- network creation based on the Euclidean distance with nested for loops is too slow
I want to create a network in which the links are formed based on a similarity metric defined as the Euclidean distance between the nodes. The distance is calculated using socio-demographic features ...
1
vote
1
answer
104
views
decreasing solver speed
How can I decrease the time complexity and increase efficiency, without writing a new algorithm. My solution solves the majority of puzzles in a fast time, but for some difficult ones it can take over ...
5
votes
1
answer
202
views
compare between two labels /objects -dominance rules
I have a function dominates() that seems to be the bottleneck of my algorithm (after profiling it). the function is as follows:
...
3
votes
1
answer
157
views
Snake from the viewpoint of the snake
I wrote a little game of snake that where you can see the field in which the snake moves fixed and you can also see the "viewpoint" of the snake, which is basically calculating the positions ...
4
votes
1
answer
134
views
Neural Network Written in Python is Extremely Slow
I coded a basic feedforward neural network with all pure python with the exception of numpy in order to better understand how neural networks work. It works, but the only problem is it is extremely ...
1
vote
0
answers
49
views
Resource reservation system
I'm using a function to determine if resources can be used again or not.
This is the numpy array I'm using.
...
5
votes
1
answer
433
views
Bancroft's method implementation
Background
I've written an algorithm to solve the three-dimensional Time Difference of Arrival (TDoA) multi-lateration problem. That is, given the coordinates of n ...
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
42
views
Pandas : Apply Merge operations from a column
I have a data frame, which contains three columns:
...
1
vote
2
answers
188
views
Better way to calculate double-scattering diffraction using cartesian product of arrays?
This script calculates points in reciprocal space for hexagonal 2D lattices, then uses the cartesian product from itertools to add each vector from one lattice to all of the vectors of the other in ...