summaryrefslogtreecommitdiff
path: root/numpy/core/numeric.py
diff options
context:
space:
mode:
authorMatthias Bussonnier <bussonniermatthias@gmail.com>2018-04-09 12:14:24 -0700
committerMatthias Bussonnier <bussonniermatthias@gmail.com>2018-04-09 13:37:08 -0700
commitf2f17210a5e5824a9977d63957c09bbe5d64eda2 (patch)
tree87b038e19a81522011b8ee40e587879865949575 /numpy/core/numeric.py
parent07d590c980edb05f1ef67cd27fff2ffe2d9c6047 (diff)
downloadnumpy-f2f17210a5e5824a9977d63957c09bbe5d64eda2.tar.gz
Cross Link full/full_like in a few see-also.
While teaching numpy I was asked the best way to create an array of nan, and `np.full` seem not be cross linked from many places; In particular in the documentation of `zeros` and `ones` seam like obvious candidates to add them. Reorder all the see-also to be - empty_like - ones_like - zero_like - full_like - empty - ones - zeros - full
Diffstat (limited to 'numpy/core/numeric.py')
-rw-r--r--numpy/core/numeric.py45
1 files changed, 28 insertions, 17 deletions
diff --git a/numpy/core/numeric.py b/numpy/core/numeric.py
index d154206c5..a5ee5f815 100644
--- a/numpy/core/numeric.py
+++ b/numpy/core/numeric.py
@@ -123,11 +123,13 @@ def zeros_like(a, dtype=None, order='K', subok=True):
See Also
--------
- ones_like : Return an array of ones with shape and type of input.
empty_like : Return an empty array with shape and type of input.
- zeros : Return a new array setting values to zero.
- ones : Return a new array setting values to one.
+ ones_like : Return an array of ones with shape and type of input.
+ full_like : Return a new array with shape of input filled with value.
empty : Return a new uninitialized array.
+ ones : Return a new array setting values to one.
+ zeros : Return a new array setting values to zero.
+ full : Return a new array of given shape filled with value.
Examples
--------
@@ -177,7 +179,14 @@ def ones(shape, dtype=None, order='C'):
See Also
--------
- zeros, ones_like
+ empty_like : Return an empty array with shape and type of input.
+ ones_like : Return an array of ones with shape and type of input.
+ zeros_like : Return an array of zeros with shape and type of input.
+ full_like : Return a new array with shape of input filled with value.
+ empty : Return a new uninitialized array.
+ zeros : Return a new array setting values to zero.
+ full : Return a new array of given shape filled with value.
+
Examples
--------
@@ -234,11 +243,13 @@ def ones_like(a, dtype=None, order='K', subok=True):
See Also
--------
- zeros_like : Return an array of zeros with shape and type of input.
empty_like : Return an empty array with shape and type of input.
- zeros : Return a new array setting values to zero.
- ones : Return a new array setting values to one.
+ zeros_like : Return an array of zeros with shape and type of input.
+ full_like : Return a new array with shape of input filled with value.
empty : Return a new uninitialized array.
+ ones : Return a new array setting values to one.
+ zeros : Return a new array setting values to zero.
+ full : Return a new array of given shape filled with value.
Examples
--------
@@ -287,13 +298,13 @@ def full(shape, fill_value, dtype=None, order='C'):
See Also
--------
- zeros_like : Return an array of zeros with shape and type of input.
- ones_like : Return an array of ones with shape and type of input.
empty_like : Return an empty array with shape and type of input.
- full_like : Fill an array with shape and type of input.
- zeros : Return a new array setting values to zero.
- ones : Return a new array setting values to one.
+ ones_like : Return an array of ones with shape and type of input.
+ zeros_like : Return an array of zeros with shape and type of input.
+ full_like : Return a new array with shape of input filled with value.
empty : Return a new uninitialized array.
+ ones : Return a new array setting values to one.
+ zeros : Return a new array setting values to zero.
Examples
--------
@@ -342,13 +353,13 @@ def full_like(a, fill_value, dtype=None, order='K', subok=True):
See Also
--------
- zeros_like : Return an array of zeros with shape and type of input.
- ones_like : Return an array of ones with shape and type of input.
empty_like : Return an empty array with shape and type of input.
- zeros : Return a new array setting values to zero.
- ones : Return a new array setting values to one.
+ ones_like : Return an array of ones with shape and type of input.
+ zeros_like : Return an array of zeros with shape and type of input.
empty : Return a new uninitialized array.
- full : Fill a new array.
+ ones : Return a new array setting values to one.
+ zeros : Return a new array setting values to zero.
+ full : Return a new array of given shape filled with value.
Examples
--------