summaryrefslogtreecommitdiff
path: root/numpy/doc/constants.py
diff options
context:
space:
mode:
authorJarrod Millman <millman@berkeley.edu>2010-02-17 23:55:16 +0000
committerJarrod Millman <millman@berkeley.edu>2010-02-17 23:55:16 +0000
commit1c7167378e9f654a80b3cb57b7c0dd7ee573a109 (patch)
tree1926d178db2e66c19552f8216926c07155f7cde3 /numpy/doc/constants.py
parente2bb09430d90c73a7be6e47ea8c4528f094f693f (diff)
downloadnumpy-1c7167378e9f654a80b3cb57b7c0dd7ee573a109.tar.gz
updated documentation from pydoc website (thanks to everyone who contributed!)
Diffstat (limited to 'numpy/doc/constants.py')
-rw-r--r--numpy/doc/constants.py26
1 files changed, 13 insertions, 13 deletions
diff --git a/numpy/doc/constants.py b/numpy/doc/constants.py
index adb7c7e02..722147dd8 100644
--- a/numpy/doc/constants.py
+++ b/numpy/doc/constants.py
@@ -75,8 +75,8 @@ add_newdoc('numpy', 'NINF',
isnan : Shows which elements are Not a Number
- isfinite : Shows which elements are finite (not one of
- Not a Number, positive infinity and negative infinity)
+ isfinite : Shows which elements are finite (not one of Not a Number,
+ positive infinity and negative infinity)
Notes
-----
@@ -214,7 +214,7 @@ add_newdoc('numpy', 'e',
"""
Euler's constant, base of natural logarithms, Napier's constant.
- `e = 2.71828182845904523536028747135266249775724709369995...`
+ ``e = 2.71828182845904523536028747135266249775724709369995...``
See Also
--------
@@ -246,8 +246,8 @@ add_newdoc('numpy', 'inf',
isnan : Shows which elements are Not a Number
- isfinite : Shows which elements are finite (not one of
- Not a Number, positive infinity and negative infinity)
+ isfinite : Shows which elements are finite (not one of Not a Number,
+ positive infinity and negative infinity)
Notes
-----
@@ -322,20 +322,20 @@ add_newdoc('numpy', 'newaxis',
Examples
--------
- >>> np.newaxis is None
+ >>> newaxis is None
True
>>> x = np.arange(3)
>>> x
array([0, 1, 2])
- >>> x[:, np.newaxis]
+ >>> x[:, newaxis]
array([[0],
[1],
[2]])
- >>> x[:, np.newaxis, np.newaxis]
+ >>> x[:, newaxis, newaxis]
array([[[0]],
[[1]],
[[2]]])
- >>> x[:, np.newaxis] * x
+ >>> x[:, newaxis] * x
array([[0, 0, 0],
[0, 1, 2],
[0, 2, 4]])
@@ -343,20 +343,20 @@ add_newdoc('numpy', 'newaxis',
Outer product, same as ``outer(x, y)``:
>>> y = np.arange(3, 6)
- >>> x[:, np.newaxis] * y
+ >>> x[:, newaxis] * y
array([[ 0, 0, 0],
[ 3, 4, 5],
[ 6, 8, 10]])
``x[newaxis, :]`` is equivalent to ``x[newaxis]`` and ``x[None]``:
- >>> x[np.newaxis, :].shape
+ >>> x[newaxis, :].shape
(1, 3)
- >>> x[np.newaxis].shape
+ >>> x[newaxis].shape
(1, 3)
>>> x[None].shape
(1, 3)
- >>> x[:, np.newaxis].shape
+ >>> x[:, newaxis].shape
(3, 1)
""")