import numpy as np vector = np.array([-3, -1, 0, 2, 5, -7]) vector[vector < 0] = 0 print(vector)