decrease function numpy