There’s numpy in the middle, so bits are outside python. The vast majority of the code is Python though and the performance gains come from being strategic about the architecture.
My point is that for most usecases you can go a lot further by looking at the code that’s running rather than the language that’s running it.