numpy where two conditions or code example
Example: 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)))]
dists[(dists >= r) & (dists <= r+dr)]
# or if you want to use np.where #
dists[(np.where((dists >= r) & (dists <= r + dr)))]