I was trying to do it, so the function tests corresponding columns, and return arrays of z and p, but even using loops it is difficult to generalize to n-d case... So I've opted for the behaviour similar to R. Since from the shape of the result (p and z are real numbers even in the nd case) it can be understood that there is no columnwize testing. Using this, the arrays of shape (n,1) or (1,n) will be handled correctly. But I see your point, users can flatten as well as iterate by themselves. Is it possble to cancel a pull request, can I just close it?