栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 软件开发 > 后端开发 > Python

NumPy - numpy.argmax

Python 更新时间: 发布时间: IT归档 最新发布 模块sitemap 名妆网 法律咨询 聚返吧 英语巴士网 伯小乐 网商动力

NumPy - numpy.argmax

NumPy - numpy.argmax

NumPy Manual
https://numpy.org/doc/stable/index.html

numpy.argmax
https://numpy.org/doc/stable/reference/generated/numpy.argmax.html

1. numpy.argmax
numpy.argmax(a, axis=None, out=None)

Returns the indices of the maximum values along an axis.
返回沿轴的最大值的索引。

Parameters

a: array_like
Input array.

axis: int, optional
By default, the index is into the flattened array, otherwise along the specified axis.
默认情况下,索引位于扁平数组中,否则沿指定轴。

out: array, optional
If provided, the result will be inserted into this array. It should be of the appropriate shape and dtype.
如果提供,结果将被插入到这个数组中。 它应该具有适当的 shape and dtype。

Returns

index_array: ndarray of ints
Array of indices into the array. It has the same shape as a.shape with the dimension along axis removed.
数组中的索引数组。它具有与 a.shape 相同的形状,但沿轴的维度已被移除。
1.1 Notes

In case of multiple occurrences of the maximum values, the indices corresponding to the first occurrence are returned.
如果最大值出现多次,则返回第一次出现对应的索引。

1.2 Examples References

https://numpy.org/doc/stable/reference/generated/numpy.argmax.html

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/503823.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号