summaryrefslogtreecommitdiff
path: root/numpy/matlib.py
diff options
context:
space:
mode:
authorMelissa Weber Mendonça <melissawm@gmail.com>2022-06-27 06:45:03 -0300
committerGitHub <noreply@github.com>2022-06-27 06:45:03 -0300
commitf3935c9dc9a661bf818a09e46da6497220bd7dca (patch)
tree91967a6e7e419f08593cfcc1b927a588672f72af /numpy/matlib.py
parente67fe9f1a86013dbfd4a5ad2bd69aa6e7f60e1fb (diff)
parent4f479744bb9f5150d1406fdb0203c5d8714e7283 (diff)
downloadnumpy-f3935c9dc9a661bf818a09e46da6497220bd7dca.tar.gz
Merge pull request #21855 from WarrenWeckesser/doc-normal-notation
DOC: Replace the mathematical notation N(...) with text.
Diffstat (limited to 'numpy/matlib.py')
-rw-r--r--numpy/matlib.py8
1 files changed, 5 insertions, 3 deletions
diff --git a/numpy/matlib.py b/numpy/matlib.py
index bd6b63289..e929fd9b1 100644
--- a/numpy/matlib.py
+++ b/numpy/matlib.py
@@ -300,9 +300,10 @@ def randn(*args):
Notes
-----
- For random samples from :math:`N(\\mu, \\sigma^2)`, use:
+ For random samples from the normal distribution with mean ``mu`` and
+ standard deviation ``sigma``, use::
- ``sigma * np.matlib.randn(...) + mu``
+ sigma * np.matlib.randn(...) + mu
Examples
--------
@@ -314,7 +315,8 @@ def randn(*args):
matrix([[ 0.99734545, 0.2829785 , -1.50629471],
[-0.57860025, 1.65143654, -2.42667924]])
- Two-by-four matrix of samples from :math:`N(3, 6.25)`:
+ Two-by-four matrix of samples from the normal distribution with
+ mean 3 and standard deviation 2.5:
>>> 2.5 * np.matlib.randn((2, 4)) + 3
matrix([[1.92771843, 6.16484065, 0.83314899, 1.30278462],