import numpy as np an_array = np.array([[11,12], [21, 22], [31, 32]]) print(an_array) an_array[(an_array %2 == 0)] an_array[an_array % 2 == 0] +=100 print(an_array)