From e07f70e73f18aba7422135c484f8a6d6f66f7305 Mon Sep 17 00:00:00 2001 From: tess <48131946+stress-tess@users.noreply.github.com> Date: Mon, 18 Mar 2024 18:03:48 -0400 Subject: [PATCH] Closes #3017: Add documentation for our random number generation (#3044) This PR (closes #3017) adds docs for our new random number generation using Generators. Co-authored-by: Tess Hayes --- pydoc/usage.rst | 1 + pydoc/usage/random.rst | 34 ++++++++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+) create mode 100644 pydoc/usage/random.rst diff --git a/pydoc/usage.rst b/pydoc/usage.rst index 5173f46099..ae6717fd83 100644 --- a/pydoc/usage.rst +++ b/pydoc/usage.rst @@ -17,5 +17,6 @@ Usage Guide usage/groupby usage/strings usage/categorical + usage/random usage/segarray usage/arrayview diff --git a/pydoc/usage/random.rst b/pydoc/usage/random.rst new file mode 100644 index 0000000000..776cf80060 --- /dev/null +++ b/pydoc/usage/random.rst @@ -0,0 +1,34 @@ +*********** +Random in Arkouda +*********** +Pseudo random number generation in Arkouda is modeled after numpy. +Just like in numpy the preferred way to access the random functionality in arkouda is via ``Generator`` objects. +If a ``Generator`` is initialized with a seed, the stream of random numbers it produces can be reproduced +by a new ``Generator`` with the same seed. This reproducibility is not guaranteed across releases. + +.. autoclass:: arkouda.random.Generator + +Creation +========= +To create a ``Generator`` use the ``default_rng`` constructor + +.. autofunction:: arkouda.random.default_rng + +Features +========== + +integers +--------- +.. autofunction:: arkouda.random.Generator.integers + +random +--------- +.. autofunction:: arkouda.random.Generator.random + +standard_normal +--------- +.. autofunction:: arkouda.random.Generator.standard_normal + +uniform +--------- +.. autofunction:: arkouda.random.Generator.uniform