Swaprow syntax error

{moderator edit: code removed}

I couldn’t understand where I am going wrong ?

I do not see any error with the syntax as well. So, I am thinking this might be an issue with the indentation. Can you please double-check?

I think I found the error. Compare the parenthesis here vs yours:

A_system = np.hstack((A,b.reshape(4,1)))

Mismatched parenthesis. Four openers, but three closers.

@Tech_Deba, in the future, please don’t post your code on the forum. That’s not allowed by the Code of Conduct.

I corrected above code.
can u help me for this problem:

multiply row 0 of the new matrix A_ref by -2 and add it to the row 1

how could I add to row 0 with row 1 by MultiplyRow() function at a time multiplication and add rows ?

The AddRows() function does this. One of its parameters is a mulitplier.

1 Like

OMG @TMosh You are the ruler, the master, the sensei! Very good work. Keep it up!

can I get privately help to my notebook ? as I stuck for many hours

The only place you should use MultiplyRows() is in the last instruction in that cell:

outcome mismatched !

Check your private messages for instructions.