+ 2

To replace all odd numbers in numpy array with -1 in python language

Please give a solution I am not able to solve this problem

19th Jan 2020, 1:19 PM
Archit
3 ответов
+ 8
https://code.sololearn.com/ciNAybZ6DN6G/?ref=app If I understood you well. Also I guess there are better ways, vectorize maybe.
19th Jan 2020, 2:57 PM
SergeiRom
+ 6
Without showing your attemts here you will hardly get some help. Try it as far as you can, link your code here, and people will help you.
19th Jan 2020, 1:29 PM
Lothar
Lothar - avatar
+ 1
Sergei Romanov thanks for the code 🙏 it will help me a lot
16th Feb 2020, 6:40 AM
Archit