@ngn I saw that, but it's only for 2-d. Same principle applies to higher-dimensions ofc, but higher-order coords are expensive to work with (though I could special-case the first few and do non-inplace for higher).
This looks promising (with caveats), though I haven't had time to read it through yet