I'm using cprofile and snakeviz to analyze some python code.
I'm getting weird results like this:

Two questions:
Given that the
cumtimeis supposed to include the runtime of the routine and all subroutines, and thetottimeis only the runtime of the routine itself - we would expect that thecumtimewill always be greater (and this is indeed the most common thing) - why is it different here? Is it related to the fact I'm heavily relying onnumpy?what does the fractional
ncallsmean? does it explain the oddcumtimevs.tottimebehavior?
EDIT:
According to the snakeviz documentation, when there are two numbers in the ncalls column that means the call is recursive. So perhaps the tottime includes only the time spent in the function not including calls to itself recursively, and the cumtime only consider primitive calls. But this is only a guess, will appreciate if someone can make a more definitive statement.