Python Forum
Simple Matrix Assignment - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: Python Coding (https://python-forum.io/forum-7.html)
+--- Forum: General Coding Help (https://python-forum.io/forum-8.html)
+--- Thread: Simple Matrix Assignment (/thread-20257.html)

Pages: 1 2


RE: Simple Matrix Assignment - m_llaa - Aug-05-2019

(Aug-04-2019, 07:32 PM)SheeppOSU Wrote:
(Aug-04-2019, 11:49 AM)m_llaa Wrote: The 2nd dimension of x has 2 elements. I want to fill the first element by y.
The first element of the second dimension would look like "x[1][0]". 1 For the second dimension and 0 to get the first element. When I try "x[1][0] = y", I get an error. I don't get an error if I do "x[1][0] = y[1][0]", so is this what you are trying to do.

Wrong wrong wrong
Please pay attention to my main question. It is clear.