Skip to main content

All Questions

Tagged with
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
101 views

"Flattening" a 2D STM image by subtracting an Nth order polynomial without typing out all the terms for each N?

I have some scanning tunneling microscopy (STM) topography images that I need to flatten. I have found that for some data I need a 4th order polynomial, but in other cases a lower order works better. ...
uhoh's user avatar
  • 593
5 votes
2 answers
527 views

Partial pivoting code in python

...
JustAnotherMind'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
3 answers
150 views

Calculate length of continuous gaps

I have a list with some nan values, out of which some are continuous, e.g.: list = [1, 2, 3, np.nan, np.nan, 6, 7, np.nan, 9, np.nan,np.nan,np.nan, 12] For some ...
Ranjan Kumar Sahu's user avatar
3 votes
0 answers
164 views

Image generator using prime numbers in polar coordinates

Related This is a Python script that generates images using prime numbers up to a given positive integer, it generates prime numbers using the Sieve of Eratosthenes with some rudimentary Wheel ...
Ξένη Γήινος's user avatar
2 votes
0 answers
95 views

Python script that generates images using Thue-Morse sequence

In mathematics, the Thue–Morse sequence, or Prouhet–Thue–Morse sequence, is the binary sequence (an infinite sequence of 0s and 1s) obtained by starting with 0 and successively appending the Boolean ...
Ξένη Γήινος'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
2 votes
1 answer
105 views

Optimize python computation of transition matrix

I have an array of integers labels, for instance array([0, 1, 1, 2, 2, 2, 3, 3, 1, 4, 4, 1, 1, 0, 0, -1, -1]). The array can be ...
Mathieu's user avatar
  • 251
9 votes
1 answer
4k views

Python decibel meter-accurate?

...
ijknm's user avatar
  • 99
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
1 vote
0 answers
51 views

BoundingBox dataclass implementation with cupy, cudf, and nvector

The dataset I'm working with is rather large so I've been experimenting with cudf and cupy. Here you can find instructions for ...
Jason Leaver's user avatar

15 30 50 per page
1
2 3 4 5
12