import numpy as np
M = np.matrix([
[-1,-2,-3],
[-4,-5,-6]
])
print(M)
- How to multiply a given row
ior columnjwith a scalar? - How to acces a given column or row as a list?
- How to set a given column or row, given a list (of the appropiate length)?
You can use slicing to accomplish this:
To assign a given column or row to a list: