numpy where multiple conditions code example
Example 1: Numpy where function multiple conditions
dists[(dists >= r) & (dists <= r+dr)]
# or if you want to use np.where #
dists[(np.where((dists >= r) & (dists <= r + dr)))]
Example 2: ifdef multiple conditions
#if defined(CONDITION1) || defined(CONDITION2)