Skip to content

Commit

Permalink
Update cheatsheet.md
Browse files Browse the repository at this point in the history
  • Loading branch information
james-weichert committed Aug 7, 2023
1 parent d754f0c commit 452c427
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions cheatsheet.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ These functions can be passed in as the second argument to `tbl.where(..)` and a
| `while <boolean expression>:` <br> &nbsp;&nbsp;&nbsp;&nbsp;`<while_body>`&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | Repeats code in `<while body>` while `<boolean expression>` is `True` |

### `np.random` Functions

| **Function** | **Description** | **Input** | **Output** |
| `np.random.seed(seed)` | Selects one of `np.random`'s pre-generated 'random' sequences and starts at the beginning of the sequence. Each time the function is re-run it will restart the random numbers generated by `np.random.randint` at the beginning of the sequence corresponding to the given seed. | **int**: seed number | None |
| `np.random.randint(start, stop)` | Generates a random number between `start` (inclusive) and `stop` (exclusive) using a pre-generated sequence of random numbers (corresponding to the specified seed). | 1. **int**: minimum value that can be generated <br> 2. **int**: the first value that _cannot_ be generated (upper endpoint) | **int**: a random number |
Expand Down

0 comments on commit 452c427

Please sign in to comment.