Problem on the withProb method following the Advanced Tutorial part 1
Issue #15
closed
Originally reported on Google Code with ID 15
What steps will reproduce the problem?
1. Testing the withProb method as described in the [Advanced Tutorial part 1](https://code.google.com/p/lea/wiki/LeaPyTutorial1#Revised_Distributions)
die1 = Lea.fromVals(1,2,3,4,5,6)
dieU = die1.withProb(die1 >=5, 1, 2)
print(dieU)
What is the expected output? What do you see instead?
Expected:
1 : 1/8
2 : 1/8
3 : 1/8
4 : 1/8
5 : 2/8
6 : 2/8
Seen:
1 : 1/6
2 : 1/6
3 : 1/6
4 : 1/6
5 : 1/6
6 : 1/6
What version of the product are you using? On what operating system?
2.1.1 with python 2.7.6 on Mac.
Please provide any additional information below.
Reported by yokai0
on 2015-07-12 06:51:52
Comments (5)
-
Account Deleted -
Account Deleted Many thanks for reporting this bug! It is a regression appearing in Lea 2.1.0 and still present in 2.1.1. Fortunately, it is located specifically in the Lea.withProb method, which is not used by other methods of Lea. This bug is now corrected in Lea 2.1.2.
Reported by
pde@n-side.com
on 2015-07-16 20:00:03 - Status changed:Verified
-
Account Deleted Thanks for the quick fix :-)
Reported by
yokai0
on 2015-07-20 06:06:20 -
repo owner - changed status to resolved
-
repo owner - changed status to closed
- Log in to comment
Reported by
pde@n-side.com
on 2015-07-16 18:44:23 - Status changed:Accepted