Skip to content

Mismatch of docs and definition of postTools.sample_prob #348

@User-zwj

Description

@User-zwj
  1. Line 146: indices is not defined if sort is False. My guess is that 'if descending' might be within 'if sort'

  2. Line 139: it seems to me that 'if descending' should return sample by the descending order of the probability. But when I checked the code of the function 'sort_by_rho',
    Line 59: indices = np.argsort(P_samples)[::-1][0:nnz]
    [::-1] will make it return the indices in descending order. This means that 'indices' in Line 128 is the descending index, so I think there is no need of Line 146. Then Line 140-145 will also make those terms sort by ascending order.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions