MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/Python/comments/eorvjg/i_made_a_gravity_simulation/fegxrtp/?context=3
r/Python • u/[deleted] • Jan 14 '20
82 comments sorted by
View all comments
10
That's so amazing
It looks SO COOOOOLLLL
Imagine this as a screensaver, or, wallpaper
6 u/[deleted] Jan 15 '20 Well this took 3h to simulate so you would need a really beefy computer 8 u/nhillson Jan 15 '20 The functions a(x) and sim_runge_kutter(m, x, v, step) seem like prime candidates for speeding up using Numba. 1 u/[deleted] Jan 15 '20 edited Jan 15 '20 I tried by putting \@numba.njit before the function definition but now the program just stops when callingthe functionEdit: I figured out numba doesnt like it when i use varaibles that arent declared in the function
6
Well this took 3h to simulate so you would need a really beefy computer
8 u/nhillson Jan 15 '20 The functions a(x) and sim_runge_kutter(m, x, v, step) seem like prime candidates for speeding up using Numba. 1 u/[deleted] Jan 15 '20 edited Jan 15 '20 I tried by putting \@numba.njit before the function definition but now the program just stops when callingthe functionEdit: I figured out numba doesnt like it when i use varaibles that arent declared in the function
8
The functions a(x) and sim_runge_kutter(m, x, v, step) seem like prime candidates for speeding up using Numba.
1 u/[deleted] Jan 15 '20 edited Jan 15 '20 I tried by putting \@numba.njit before the function definition but now the program just stops when callingthe functionEdit: I figured out numba doesnt like it when i use varaibles that arent declared in the function
1
I tried by putting \@numba.njit before the function definition but now the program just stops when callingthe function
Edit: I figured out numba doesnt like it when i use varaibles that arent declared in the function
10
u/quantumwoooo Jan 14 '20
That's so amazing
It looks SO COOOOOLLLL
Imagine this as a screensaver, or, wallpaper