So today I got busy on rewriting my function so it could be used with numba. The problem is, numba doesn't work with Pandas, so we need to use numpy. This was where ChatGPT messed up, it wasn't able to rewrite pandas code to numpy.