Hello World example setup process for nbdev
Project description
nbdev-hello-world
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.
Install
conda install -c cooperrc nbdev_hello_world
How to use
Here, we throw 1 die with 6 sides:
result = throw(6)
result
4 = sum([4])
Next, we can throw $\times 2$ dice and look at the sum
throw(6, 2)
3 = sum([1 2])
The dice values are stored in an array, as throw(N, inhand).dice
as
such
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
result.sum
13
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file nbdev_hello_dice-0.0.1.tar.gz
.
File metadata
- Download URL: nbdev_hello_dice-0.0.1.tar.gz
- Upload date:
- Size: 7.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.11.3 pkginfo/1.8.3 requests/2.28.1 requests-toolbelt/0.9.1 tqdm/4.64.1 CPython/3.8.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 83e46643d1ae9b6c974cc2ac0a2cd6090b8f0b9cc725796e3e005fabce986d38 |
|
MD5 | 2dcc138dba412c815e4882a1749b6e92 |
|
BLAKE2b-256 | 2106c0a36a4075a380ee6baa78854c4a0e0ff4bfe7259cd9fc238ced27001be6 |
File details
Details for the file nbdev_hello_dice-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: nbdev_hello_dice-0.0.1-py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.7.1 importlib_metadata/4.11.3 pkginfo/1.8.3 requests/2.28.1 requests-toolbelt/0.9.1 tqdm/4.64.1 CPython/3.8.15
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 69788bb2bb8a2e83f312b3c0b37d9934381bfc4dcdd690e3857226019a0467ff |
|
MD5 | a130e593e664632f9ee44cf05e61540c |
|
BLAKE2b-256 | a9eee14e00eedad78c17ce1e4c20a0749352c7f0dc5cf310ee0efd0e1ad7e3b5 |