Search
Search Results
Search finished, found 10 page(s) matching the search query.
- numpy.unravel_index
...NumPy reference Routines and objects by topic Indexing routines numpy.unravel_index...
- numpy.unravel_index (Python function, in numpy.unravel_index)
- NumPy 1.16.0 Release Notes
...s who wish to override the inner loop functions in built-in ufuncs should use PyUFunc_ReplaceLoopBySignature. The numpy.unravel_index keyword argument dims is deprecated, use shape instead. The numpy.histogram normed argument is deprecated....
- NumPy 1.21.0 Release Notes
...s of PCG64. See Upgrading PCG64 with PCG64DXSM for more details. (gh-18906) Expired deprecations The shape argument unravel_index cannot be passed as dims keyword argument anymore. (Was deprecated in NumPy 1.16.) (gh-17900) The functio...
- numpy.argmax
...ng array having same shape as a.shape. See also ndarray.argmax, argmin amaxThe maximum value along a given axis. unravel_indexConvert a flat index into an index tuple. take_along_axisApply np.expand_dims(index_array, axis) from argm...
- numpy.argmin
...ng array having same shape as a.shape. See also ndarray.argmin, argmax aminThe minimum value along a given axis. unravel_indexConvert a flat index into an index tuple. take_along_axisApply np.expand_dims(index_array, axis) from argm...
- numpy.argsort
....sort(x, axis=1) array([[0, 3], [2, 2]]) Indices of the sorted elements of a N-dimensional array: >>> ind = np.unravel_index(np.argsort(x, axis=None), x.shape) >>> ind (array([0, 1, 1, 0]), array([0, 0, 1, 1])) >>> x[ind] # same a...
- numpy.ravel_multi_index
...s: raveled_indicesndarrayAn array of indices into the flattened version of an array of dimensions dims. See also unravel_index Examples >>> import numpy as np >>> arr = np.array([[3,6,6],[4,5,1]]) >>> np.ravel_multi_index(arr, (7,6...
- numpy.unravel_index
...NumPy reference Routines and objects by topic Indexing routines numpy.unravel_index...
- How to index
ndarrays
...in an N-dimensional array, use reshape to reshape the array to a 2D array, apply argmax or argmin along axis=1 and use unravel_index to recover the index of the values per slice: >>> x = np.arange(2*2*3).reshape(2, 2, 3) % 7 # 3D example...