I am looking for the python's equivalent of the reorder.dendrogram
function from R.
From the R's documentations:
This function takes a dendrogram and a vector of values and reorders the dendrogram in the order of the supplied vector, maintaining the constraints on the dendrogram.
I am aware on how to order a given vector using the hierarchical clustering results (e.g. this nice example) - the operation I am looking for is more subtle.
An interesting option on a similar direction is the optimal_ordering
function/argument from scipy. However, it represents an individual solution based on the algorithm behind the "optimal" arrangement and doesn't really provide any level of control for arbitrary ordering vectors.