0
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

Hey, so I have three "20x10" zero matrices, called "max_internal_biofuel", "oscillation_internal_biofuel" and "final_external_biofuel".

and I was just wondering why when selecting the "j th(19)" row and "i th(0)" column of each matrix and assigning them different values, the elements rather than being 12,11,14 are all just 14.

A solution to this would be greatly appreciated! Thank you!

Daniel
  • 113
  • 1
  • 8
  • Please can you [edit](https://stackoverflow.com/posts/50432884/edit) with a *[mcve]*. So, in this case, images and links to images are not helpful, but plain text works. – jpp May 20 '18 at 08:28
  • 2
    All three of your identifiers refer to the same array. You can define `amx_internal_biofuel = zero_matrice.copy()` and similarly for others to get different arrays. – hilberts_drinking_problem May 20 '18 at 08:52

0 Answers0