Order statistics in PyMC3

What distribution (and dimensions) are you using that transform with? The error happens because the logp of the distribution and the log_jac_det don’t match in shape.

Can’t you use the default ordered distribution, which will sort along the last axis?