First time here? Check out the FAQ!
answered 2020-04-18 18:34:30 +0100
To replace the last six entries of the row number 1:
K[1, -6:] = vector([1] * 6)
To replace entries 40 to 43 of row 1 with the value 1:
K[1, 40:44] = vector([1] * 4)