Keep value sequence ordering

Issue #26 closed
Pierre Denis repo owner created an issue

It would be nice to have a new argument of Lea.fromValFreqs constructor or a new dedicated method that keeps the order of given values unchanged (i.e. NO sorting). Example:

>>> Lea.fromValFreqs(('B',2),('A',2),('C',1))
A : 2/5
B : 2/5
C : 1/5
>>> Lea.fromValFreqs(('B',2),('A',2),('C',1),sorting=False)
B : 2/5
A : 2/5
C : 1/5

Comments (5)

  1. Log in to comment