diff --git a/src/array_api_extra/_funcs.py b/src/array_api_extra/_funcs.py index 5a29069..234617f 100644 --- a/src/array_api_extra/_funcs.py +++ b/src/array_api_extra/_funcs.py @@ -123,9 +123,6 @@ def expand_dims( ) raise IndexError(err_msg) axis = tuple(dim % ndim for dim in axis) - if len(set(axis)) != len(axis): - err_msg = "Duplicate dimensions specified in `axis`." - raise ValueError(err_msg) if len(set(axis)) != len(axis): err_msg = "Duplicate dimensions specified in `axis`." raise ValueError(err_msg)