From f2f17210a5e5824a9977d63957c09bbe5d64eda2 Mon Sep 17 00:00:00 2001 From: Matthias Bussonnier Date: Mon, 9 Apr 2018 12:14:24 -0700 Subject: 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 --- numpy/add_newdocs.py | 29 ++++++++++++++++++++++++----- 1 file changed, 24 insertions(+), 5 deletions(-) (limited to 'numpy/add_newdocs.py') diff --git a/numpy/add_newdocs.py b/numpy/add_newdocs.py index 0a7b2b13d..88d6df184 100644 --- a/numpy/add_newdocs.py +++ b/numpy/add_newdocs.py @@ -784,7 +784,15 @@ add_newdoc('numpy.core.multiarray', 'array', See Also -------- - empty, empty_like, zeros, zeros_like, ones, ones_like, full, full_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. + 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. + Notes ----- @@ -862,7 +870,14 @@ add_newdoc('numpy.core.multiarray', 'empty', See Also -------- - empty_like, zeros, ones + 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. + 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. + Notes ----- @@ -920,9 +935,11 @@ add_newdoc('numpy.core.multiarray', 'empty_like', -------- 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. + full : Return a new array of given shape filled with value. Notes ----- @@ -983,11 +1000,13 @@ add_newdoc('numpy.core.multiarray', 'zeros', 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. - 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. + full : Return a new array of given shape filled with value. Examples -------- -- cgit v1.2.1 From 35753b1f28106d5b3fe48f31130e2dde7a02aa0c Mon Sep 17 00:00:00 2001 From: Matthias Bussonnier Date: Mon, 9 Apr 2018 13:43:38 -0700 Subject: 'remove indirect relationships' --- numpy/add_newdocs.py | 9 --------- 1 file changed, 9 deletions(-) (limited to 'numpy/add_newdocs.py') diff --git a/numpy/add_newdocs.py b/numpy/add_newdocs.py index 88d6df184..62eaf1335 100644 --- a/numpy/add_newdocs.py +++ b/numpy/add_newdocs.py @@ -871,9 +871,6 @@ add_newdoc('numpy.core.multiarray', 'empty', See Also -------- 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. 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. @@ -937,9 +934,6 @@ add_newdoc('numpy.core.multiarray', 'empty_like', 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. Notes ----- @@ -1000,10 +994,7 @@ add_newdoc('numpy.core.multiarray', 'zeros', See Also -------- - 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. ones : Return a new array setting values to one. full : Return a new array of given shape filled with value. -- cgit v1.2.1