About No.25
martin-lee07 opened this issue · 4 comments
martin-lee07 commented
Given a 1D array, negate all elements which are between 3 and 8, in place
the code is
Z[(3 < Z) & (Z <= 8)] *= -1
and according to the title that "### between 3 and 8, in place",shouldn't it is
Z[(3 < Z) & (Z < 8)] *= -1
? without =
because between 3 and 8 is 4,5,6,7 these four elements?
rougier commented
You're right, I should have said 3 and 8 excluded and use your proposed fix. Can you make a PR?
prakharb10 commented
Hi, can I help you with this?
rougier commented
Let's see if @martin-lee07 want to make the PR first.