Metadata-Version: 2.1
Name: nbdev_hello_dice
Version: 0.0.1
Summary: Hello World example setup process for nbdev
Home-page: https://github.com/cooperrc/nbdev-hello-world
Author: Ryan C. Cooper
Author-email: ryan.c.cooper@uconn.edu
License: Apache Software License 2.0
Keywords: nbdev jupyter notebook python
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: License :: OSI Approved :: Apache Software License
Requires-Python: >=3.7
Description-Content-Type: text/markdown
Provides-Extra: dev
License-File: LICENSE

nbdev-hello-world
================

<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->

This is a simple dice throwing class that uses [NumPy
default_rng](https://numpy.org/doc/stable/reference/random/generator.html)
to build an array of random integers depending upon the number of sides
on the dice and the number of dice thrown.

## Install

``` sh
conda install -c cooperrc nbdev_hello_world
```

## How to use

Here, we throw 1 die with 6 sides:

``` python
result = throw(6)
result
```

    4 = sum([4])

Next, we can throw $\times 2$ dice and look at the sum

``` python
throw(6, 2)
```

    3 = sum([1 2])

The dice values are stored in an array, as `throw(N, inhand).dice` as
such

``` python
result = throw(6, 4)
result.dice
```

    array([2, 1, 4, 6])

The `sum` of the dice values are saved in `throw.(N, inhand).sum` as
such

``` python
result.sum
```

    13
