I am not familiar with this particular numpy function 
I don’t think we have such function in pytorch at the moment, but I’m sure we will be happy to accept a PR to add this new feature.
Do you know how it is implemented? Is it only a wrapper around the 1D version, or does it need substantially different algorithms?