summaryrefslogtreecommitdiff
path: root/numpy
diff options
context:
space:
mode:
authormelissawm <melissawm.github@gmail.com>2022-10-11 17:23:29 -0300
committermelissawm <melissawm@gmail.com>2022-10-11 20:08:37 -0300
commit6fac305a8b62e40aa7a353d4cf72688939c0e0a4 (patch)
treedecee175a52111e4aa23f823d6121ed4812d03a8 /numpy
parent5c427d6a597f62352e9baf870e1b2edde58bee45 (diff)
downloadnumpy-6fac305a8b62e40aa7a353d4cf72688939c0e0a4.tar.gz
DOC: Improve how-to-partition contents.
Also add links to this document from the functions' docstrings.
Diffstat (limited to 'numpy')
-rw-r--r--numpy/core/_add_newdocs.py1
-rw-r--r--numpy/core/function_base.py3
-rw-r--r--numpy/lib/function_base.py1
-rw-r--r--numpy/lib/index_tricks.py2
4 files changed, 7 insertions, 0 deletions
diff --git a/numpy/core/_add_newdocs.py b/numpy/core/_add_newdocs.py
index 251dc305b..104bed1a7 100644
--- a/numpy/core/_add_newdocs.py
+++ b/numpy/core/_add_newdocs.py
@@ -1774,6 +1774,7 @@ add_newdoc('numpy.core.multiarray', 'arange',
numpy.linspace : Evenly spaced numbers with careful handling of endpoints.
numpy.ogrid: Arrays of evenly spaced numbers in N-dimensions.
numpy.mgrid: Grid-shaped arrays of evenly spaced numbers in N-dimensions.
+ :ref:`how-to-partition`
Examples
--------
diff --git a/numpy/core/function_base.py b/numpy/core/function_base.py
index b5323fb17..3dc51a81b 100644
--- a/numpy/core/function_base.py
+++ b/numpy/core/function_base.py
@@ -91,6 +91,7 @@ def linspace(start, stop, num=50, endpoint=True, retstep=False, dtype=None,
scale (a geometric progression).
logspace : Similar to `geomspace`, but with the end points specified as
logarithms.
+ :ref:`how-to-partition`
Examples
--------
@@ -242,6 +243,7 @@ def logspace(start, stop, num=50, endpoint=True, base=10.0, dtype=None,
linspace : Similar to logspace, but with the samples uniformly distributed
in linear space, instead of log space.
geomspace : Similar to logspace, but with endpoints specified directly.
+ :ref:`how-to-partition`
Notes
-----
@@ -338,6 +340,7 @@ def geomspace(start, stop, num=50, endpoint=True, dtype=None, axis=0):
progression.
arange : Similar to linspace, with the step size specified instead of the
number of samples.
+ :ref:`how-to-partition`
Notes
-----
diff --git a/numpy/lib/function_base.py b/numpy/lib/function_base.py
index 1a840669c..1cd5c92f2 100644
--- a/numpy/lib/function_base.py
+++ b/numpy/lib/function_base.py
@@ -4943,6 +4943,7 @@ def meshgrid(*xi, copy=True, sparse=False, indexing='xy'):
mgrid : Construct a multi-dimensional "meshgrid" using indexing notation.
ogrid : Construct an open multi-dimensional "meshgrid" using indexing
notation.
+ how-to-index
Examples
--------
diff --git a/numpy/lib/index_tricks.py b/numpy/lib/index_tricks.py
index e74553de4..95d5e3ede 100644
--- a/numpy/lib/index_tricks.py
+++ b/numpy/lib/index_tricks.py
@@ -234,6 +234,7 @@ class MGridClass(nd_grid):
ogrid : like mgrid but returns open (not fleshed out) mesh grids
meshgrid: return coordinate matrices from coordinate vectors
r_ : array concatenator
+ :ref:`how-to-partition`
Examples
--------
@@ -286,6 +287,7 @@ class OGridClass(nd_grid):
mgrid : like `ogrid` but returns dense (or fleshed out) mesh grids
meshgrid: return coordinate matrices from coordinate vectors
r_ : array concatenator
+ :ref:`how-to-partition`
Examples
--------