MAINT: Fix missed usage of deprecated tools.rank