May-04-2020, 01:56 PM
Before anyone crucify me for asking a stupid question, I have to point out that I started learning Python 2 weeks ago (and I don't have much time per day, so progress is a bit slow...)
Having some experience mainly with C++ (some other languages as well) it was mainly learning language syntax and it was, and still is, easy. But, I believe I am missing something when it comes to matrices, so I figured I should ask here.
Now, I know I can use NymPy, but I want to understand how Python basics operate.
Let’s say I want to declare 3x3 matrix. To my surprise it was a bit more complicated than simply writing MatrixA[a][b][c]…
So, I learned that in Python you have to declare array that will be a member of another array and so on..
But, here is my question:
Let say I want to change Matrix[i][j][k]=AnyValue
This doesn’t work. Simple (and probably stupid solution) would be to change initial array first – make changes on the k-place. Then put that array in the second one (2x2 matrix) on the “j” place and so on…
But, I am sure I’m missing something here. It can’t be that complicated.
So, how do I address particular member of the array and how do I change it?
Sorry, for a long post…
Having some experience mainly with C++ (some other languages as well) it was mainly learning language syntax and it was, and still is, easy. But, I believe I am missing something when it comes to matrices, so I figured I should ask here.
Now, I know I can use NymPy, but I want to understand how Python basics operate.
Let’s say I want to declare 3x3 matrix. To my surprise it was a bit more complicated than simply writing MatrixA[a][b][c]…
So, I learned that in Python you have to declare array that will be a member of another array and so on..
But, here is my question:
Let say I want to change Matrix[i][j][k]=AnyValue
This doesn’t work. Simple (and probably stupid solution) would be to change initial array first – make changes on the k-place. Then put that array in the second one (2x2 matrix) on the “j” place and so on…
But, I am sure I’m missing something here. It can’t be that complicated.
So, how do I address particular member of the array and how do I change it?
Sorry, for a long post…