replace the b-th row and >30-th column of a by a-30
1 ビュー (過去 30 日間)
I want to replace the b-th row and >30-th column of a by a-30. How to make the following code more efficient within one line? Thank you!
Walter Roberson 2018 年 4 月 1 日
There is no more efficient version for that.
I am not saying that it cannot be done in vectorized form: it can be done in vectorized form. I am saying that you need to make extra calculations and involve extra memory in such a way that the for loop is likely to be more efficient. Especially since duplicate b values are possible so you are going to be affecting the same location multiple times.