Skip to main content

All Questions

2 votes
2 answers
250 views

Infinite 2d block world (2d minecraft) with chunk system, physics and slower loading

Follow up from this question. I have added a slower loading system that allows the main game to run faster but I still get under 30 fps with caves even if I allow the player to outrun the loading. I ...
coder's user avatar
  • 241
3 votes
5 answers
2k views

How do I speed up this simulation program

This is a program to solve a differential equation numerically using Euler method. As of now, it is very slow, and I need to run 10000 Monte Carlo simulations. The differential equation is called ...
Jonathan Wick's user avatar
3 votes
1 answer
103 views

3ph 2l inverter simulation with SPWM

Here is a code for a simple model of three phase two level inverter with constant DC voltage source and three phase RL load. ...
ppinha's user avatar
  • 51
4 votes
2 answers
174 views

NumPy script to convert BGR to HSL and back

This is a NumPy script that converts BGR arrays to HSL arrays and back, without using OpenCV. Input and output values are arrays of 3 dimensions with values ranging from 0 to 1, the shape of the ...
Ξένη Γήινος's user avatar
3 votes
1 answer
162 views

Solve an option pricing PDE in Python - Part 1 [closed]

The Github repository NM-Heston solves call option prices under the Heston 2-factor model using ADI splitting schemes. I am adapting the code to price options under the 3-factor Heston-Hull-White ...
Ruan's user avatar
  • 111
1 vote
1 answer
141 views

Further optimizing the ISING model

I've implemented the 2D ISING model in Python, using NumPy and Numba's JIT: ...
Amirhossein Rezaei's user avatar
3 votes
1 answer
136 views

Create a forecast matrix from time series samples

I would like to create a matrix of delay from a time series. For example, given y = [y_0, y_1, y_2, ..., y_N] and W = 5 I need to create this matrix: ...
graille's user avatar
  • 133
4 votes
1 answer
105 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 ...
super_ask's user avatar
  • 143
3 votes
1 answer
835 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 ...
Senna's user avatar
  • 41
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: ...
sos's user avatar
  • 161
2 votes
1 answer
69 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. ...
Mounir Hafsa's user avatar
1 vote
1 answer
50 views

Pandas : Apply Merge operations from a column

I have a data frame, which contains three columns: ...
Ayodhyankit Paul's user avatar
6 votes
1 answer
124 views

Code optimisation: Converting dataframe to numpy's ndarray

I am working with a dataframe of over 21M rows. ...
arilwan's user avatar
  • 161
1 vote
1 answer
114 views

Getting the square of the difference between many points in a NumPy array

I have an array with 40000 numbers that are floats or ints. I need to perform some calculation. To do this I have used nested for loop, but the code is really slow. Can I use something instead of ...
Tanvir's user avatar
  • 27
4 votes
1 answer
168 views

Code for wireless communication work

I need some pointers on how I can speed up my code, as of now it is incredible slow for larger inputs. The way the code works is that the file Loc_Circle_50U.txt contains the true locations of 50 ...
user3656142's user avatar

15 30 50 per page