diff --git a/hypothesis-python/src/hypothesis/extra/array_api.py b/hypothesis-python/src/hypothesis/extra/array_api.py index 7a8f6802f2..43fdfb0805 100644 --- a/hypothesis-python/src/hypothesis/extra/array_api.py +++ b/hypothesis-python/src/hypothesis/extra/array_api.py @@ -692,7 +692,7 @@ def indices( check_valid_dims(min_dims, "min_dims") if max_dims is None: - max_dims = min(min_dims + 2, len(shape), NDIM_MAX) + max_dims = min(len(shape), NDIM_MAX) check_type(int, max_dims, "max_dims") assert isinstance(max_dims, int) check_argument(