我想打印出具有最大值的数组的索引(由于索引从0开始,我需要在索引值中添加一个以获得1索引)。示例:
rslt = np.amax(final_array)
print("The maximum value is :", rslt)
print("The optimal choice that has that value is :", rslt.index[])
上下文:我正在用Python编写一些多准则决策分析代码。我导入numpy来处理备选方案、标准和权重的数组。我用np.amax公司在最终数组中查找最大值。你知道吗
Tags:
使用numpy.argmax查找最大值的索引。你知道吗
相关问题 更多 >
编程相关推荐