import numpy as np draws = np.random.default_rng(41).uniform(0., 40., size=200) small = np.minimum(draws, 20.) large = np.minimum(draws, 30.) print(bool((large >= small).all())) print(bool((small <= 20.).all() and (large <= 30.).all())) print(draws.shape)