consider using numpy.minimum()