= throw(6)
result result
1 = sum([1])
This is a simple dice throwing class that uses NumPy default_rng to build an array of random integers depending upon the number of sides on the dice and the number of dice thrown.
Here, we throw 1 die with 6 sides:
Next, we can throw \(\times 2\) dice and look at the sum
The dice values are stored in an array, as throw(N, inhand).dice
as such
The sum
of the dice values are saved in throw.(N, inhand).sum
as such