Could you have a look at this too? I think we should probably just remove the special case. There will be some warnings raised (actually more then just one, but that is also the case in std, etc.) in some cases, but I don't see a problem with it, the current result is plain nonsense in those cases.

If you fix this, there is also the case of `ddof` being too large. So maybe you could add a warning such as `std`/`var` are now giving: `RuntimeWarning: Degrees of freedom <= 0 for slice` if fact is <= 0 (and replace fact by 0 in that case).