Thank you for mentioning the numpy argsort function. Yes, it looks like it would do the same job as GRADE_UP. I will take a look at it to see how it is implemented. It is interesting that they give the choice of three different algorithms, plus stability. HPF requires that GRADE_UP and GRADE_DOWN be stable.
2 Likes