numpy 1.22.4 Pypi GitHub Homepage
Other Docs
ReturnsBackRef

An instance of numpy.lib.index_tricks.nd_grid which returns an dense (or fleshed out) mesh-grid when indexed, so that each returned argument has the same shape. The dimensions and number of the output arrays are equal to the number of indexing dimensions. If the step length is not a complex number, then the stop is not inclusive.

However, if the step length is a complex number (e.g. 5j), then the integer part of its magnitude is interpreted as specifying the number of points to create between the start and stop values, where the stop value is inclusive.

Returns

mesh-grid `ndarrays` all of the same dimensions

nd_grid instance which returns a dense multi-dimensional "meshgrid".

See Also

numpy.lib.index_tricks.nd_grid

class of :None:None:`ogrid` and :None:None:`mgrid` objects

ogrid

like mgrid but returns open (not fleshed out) mesh grids

r_

array concatenator

Examples

>>> np.mgrid[0:5,0:5]
array([[[0, 0, 0, 0, 0],
        [1, 1, 1, 1, 1],
        [2, 2, 2, 2, 2],
        [3, 3, 3, 3, 3],
        [4, 4, 4, 4, 4]],
       [[0, 1, 2, 3, 4],
        [0, 1, 2, 3, 4],
        [0, 1, 2, 3, 4],
        [0, 1, 2, 3, 4],
        [0, 1, 2, 3, 4]]])
>>> np.mgrid[-1:1:5j]
array([-1. , -0.5,  0. ,  0.5,  1. ])
See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

scipy.spatial._kdtree.KDTree.query_ball_point skimage.morphology.extrema.h_maxima skimage.morphology.max_tree.diameter_closing scipy.interpolate._ndgriddata.griddata skimage.morphology.extrema.h_minima skimage.morphology.max_tree.area_opening skimage.transform._warps.warp skimage.morphology.max_tree.max_tree_local_maxima skimage.morphology.max_tree.diameter_opening scipy.fft._basic.fftn skimage.morphology.greyreconstruct.reconstruction skimage.morphology.max_tree.area_closing scipy.interpolate._rbfinterp.RBFInterpolator scipy.spatial._kdtree.KDTree.query scipy.fft._basic.fft2

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


GitHub : /numpy/lib/index_tricks.py#209
type: <class 'type'>
Commit: