def get_rank_histograms(testres, bins=None, key=None, join_acfgs=False):
    "\n        Ignore:\n            testres.get_infoprop_mat('qnx2_gt_name_rank')\n            testres.get_infoprop_mat('qnx2_gf_name_rank')\n            testres.get_infoprop_mat('qnx2_qnid')\n\n        Example:\n            >>> # DISABLE_DOCTEST\n            >>> from wbia.expt.test_result import *  # NOQA\n            >>> from wbia.init import main_helpers\n            >>> ibs, testres = main_helpers.testdata_expts('testdb1', a=['default'])\n            >>> bins = 'dense'\n            >>> key = 'qnx2_gt_name_rank'\n            >>> config_hists = testres.get_rank_histograms(bins, key=key)\n        "
    if (key is None):
        key = 'qx2_gt_rank'
    if (bins is None):
        bins = testres.get_rank_histogram_bins()
    elif (bins == 'dense'):
        bins = np.arange((testres.get_worst_possible_rank() + 1))
    cfgx2_ranks = testres.get_infoprop_list(key=key)
    cfgx2_hist = np.zeros((len(cfgx2_ranks), (len(bins) - 1)), dtype=np.int32)
    for (cfgx, ranks) in enumerate(cfgx2_ranks):
        freq = np.histogram(ranks, bins=bins)[0]
        cfgx2_hist[cfgx] = freq
    if join_acfgs:
        groupxs = testres.get_cfgx_groupxs()
        cfgx2_hist = np.array([np.sum(group, axis=0) for group in ut.apply_grouping(cfgx2_hist, groupxs)])
    return (cfgx2_hist, bins)
Ignore:
    testres.get_infoprop_mat('qnx2_gt_name_rank')
    testres.get_infoprop_mat('qnx2_gf_name_rank')
    testres.get_infoprop_mat('qnx2_qnid')

Example:
    >>> # DISABLE_DOCTEST
    >>> from wbia.expt.test_result import *  # NOQA
    >>> from wbia.init import main_helpers
    >>> ibs, testres = main_helpers.testdata_expts('testdb1', a=['default'])
    >>> bins = 'dense'
    >>> key = 'qnx2_gt_name_rank'
    >>> config_hists = testres.get_rank_histograms(bins, key=key)
def get_rank_histograms(testres, bins=None, key=None, join_acfgs=False):
    "\n        Ignore:\n            testres.get_infoprop_mat('qnx2_gt_name_rank')\n            testres.get_infoprop_mat('qnx2_gf_name_rank')\n            testres.get_infoprop_mat('qnx2_qnid')\n\n        Example:\n            >>> # DISABLE_DOCTEST\n            >>> from wbia.expt.test_result import *  # NOQA\n            >>> from wbia.init import main_helpers\n            >>> ibs, testres = main_helpers.testdata_expts('testdb1', a=['default'])\n            >>> bins = 'dense'\n            >>> key = 'qnx2_gt_name_rank'\n            >>> config_hists = testres.get_rank_histograms(bins, key=key)\n        "
    if (key is None):
        key = 'qx2_gt_rank'
    if (bins is None):
        bins = testres.get_rank_histogram_bins()
    elif (bins == 'dense'):
        bins = np.arange((testres.get_worst_possible_rank() + 1))
    cfgx2_ranks = testres.get_infoprop_list(key=key)
    cfgx2_hist = np.zeros((len(cfgx2_ranks), (len(bins) - 1)), dtype=np.int32)
    for (cfgx, ranks) in enumerate(cfgx2_ranks):
        freq = np.histogram(ranks, bins=bins)[0]
        cfgx2_hist[cfgx] = freq
    if join_acfgs:
        groupxs = testres.get_cfgx_groupxs()
        cfgx2_hist = np.array([np.sum(group, axis=0) for group in ut.apply_grouping(cfgx2_hist, groupxs)])
    return (cfgx2_hist, bins)