Optimize unitVector function with numba