Replace Values In Numpy Array Based On Condition