为什么等同于matrice元素不能正常工作

时间:2018-05-20 08:12:35

标签: python python-3.x matrix indexing

import numpy as np


alpha_p_array  = np.arange(0.01,0.1+0.01/2,0.01)
alpha_b_array = np.logspace(-2, 0, num=20)
zero_matrice = np.zeros((np.size(alpha_b_array),np.size(alpha_p_array)))
max_internal_biofuel = zero_matrice 
oscillation_internal_biofuel = zero_matrice 
final_external_biofuel = zero_matrice

i =  19                                                                                                    
j =  0

max_internal_biofuel[i,j] = 12
oscillation_internal_biofuel[i,j] = 11
final_external_biofuel[i,j] =  14
嘿,所以我有三个" 20x10"零矩阵,称为" max_internal_biofuel"," oscillation_internal_biofuel"和" final_external_biofuel"。

我只是想知道为什么选择" j th(19)"行和" i th(0)"每个矩阵的列并赋予它们不同的值,元素而不是12,11,14都只是14。

对此的解决方案将不胜感激!谢谢!

0 个答案:

没有答案