[SciPy-Dev] Rank and Unrank functions

Joseph Fox-Rabinovitz jfoxrabinovitz at gmail.com
Fri May 8 15:11:40 EDT 2020


Scipy.special has the functions comb and perm but no rank and unrank to
convert linear indices to combination or permutation. These are fairly
useful for generating random sequences from large sets. Is there any
objection to a PR implementing these functions?

The signatures I had in mind are

perm_rank(indices, n, k)
perm_unrank(index, n, k)
comb_rank(indices, n, k)
comb_unrank(index, n, k)

Regards,

Joe
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scipy-dev/attachments/20200508/192bf73a/attachment.html>


More information about the SciPy-Dev mailing list