-1
列表的一列。如果我有numpy
的ordered dictionary
陣列獲取最大陣列
from collections import OrderedDict
>>> bias
OrderedDict([('bias_0.0', array([[ -4.76624398e-04, 4.49229230e-03, 1.70000000e+01],
[ -1.55963349e-03, 1.43121798e-03, 1.80000000e+01],
[ 1.83762370e-03, 1.15303340e-03, 1.90000000e+01],
[ 3.11141924e-03, 7.94052356e-04, 2.00000000e+01],
[ -1.45957877e-04, 9.43913508e-04, 2.10000000e+01],
[ -2.81545419e-04, 9.63629400e-04, 2.20000000e+01],
[ 8.18959167e-04, 9.94954147e-04, 2.30000000e+01],
[ 2.83641949e-03, 1.30510580e-03, 2.40000000e+01]])), ('bias_0.5', array([[ -4.76624398e-04, 4.49229230e-03, 1.70000000e+01],
[ -1.55963349e-03, 1.43121798e-03, 1.80000000e+01],
[ 1.83762370e-03, 1.15303340e-03, 1.90000000e+01],
[ 3.11141924e-03, 7.94052356e-04, 2.00000000e+01],
[ -1.45957877e-04, 9.43913508e-04, 2.10000000e+01],
[ -2.37881094e-04, 9.59085284e-04, 2.20000000e+01],
[ 3.66215090e-03, 9.91373349e-04, 2.30000000e+01],
[ 1.34585904e-02, 1.43382398e-03, 2.40000000e+01]])), ('bias_0.7', array([[ -4.76624398e-04, 4.49229230e-03, 1.70000000e+01],
[ -1.55963349e-03, 1.43121798e-03, 1.80000000e+01],
[ 1.83762370e-03, 1.15303340e-03, 1.90000000e+01],
[ 3.11138346e-03, 7.94066088e-04, 2.00000000e+01],
[ -1.42918871e-04, 9.43977120e-04, 2.10000000e+01],
[ 1.22558682e-04, 9.78267596e-04, 2.20000000e+01],
[ 7.97667211e-03, 1.05694380e-03, 2.30000000e+01],
[ 1.72989414e-02, 1.60985477e-03, 2.40000000e+01]])), ('bias_0.9', array([[ -4.76624398e-04, 4.49229230e-03, 1.70000000e+01],
[ -1.55963349e-03, 1.43121798e-03, 1.80000000e+01],
[ 1.83762370e-03, 1.15303340e-03, 1.90000000e+01],
[ 3.11163249e-03, 7.93727126e-04, 2.00000000e+01],
[ -1.59545890e-05, 9.47506839e-04, 2.10000000e+01],
[ 3.09800829e-03, 9.76612289e-04, 2.20000000e+01],
[ 8.85488891e-03, 8.91245114e-04, 2.30000000e+01],
[ 8.39106167e-03, 9.21750885e-03, 2.40000000e+01]])), ('bias_0.95', array([[ -4.76624398e-04, 4.49229230e-03, 1.70000000e+01],
[ -1.55963349e-03, 1.43121798e-03, 1.80000000e+01],
[ 1.83848596e-03, 1.15319035e-03, 1.90000000e+01],
[ 3.11342300e-03, 7.93791443e-04, 2.00000000e+01],
[ 4.05623641e-04, 9.67667341e-04, 2.10000000e+01],
[ 1.13983053e-03, 8.23258801e-04, 2.20000000e+01],
[ -4.42620841e-03, 1.09573777e-03, 2.30000000e+01],
[ -1.98968147e-03, 1.03812656e-02, 2.40000000e+01]]))])
我怎麼能拿第一列中的所有陣列的最大價值?
我可以糾正我的問題嗎? – Dalek 2014-09-30 21:09:00
當然 - 如果我不正確地解釋它,表示歉意。 – 2014-09-30 21:09:22
您可以擴展他的解決方案。我假設你有多個'b's。只需將所有數組的最大值加載到列表中,並找到列表中最大的值。 – 2014-09-30 21:10:17