numpy.where() with multiple conditions TWO ARRAY 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)))]