Skip to content

Commit d5f62c9

Browse files
committed
Use the official required kwarg form
I forgot this existed
1 parent 73933f5 commit d5f62c9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

base/abstractarraymath.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ julia> squeeze(a; dims=3)
6464
2 4
6565
```
6666
"""
67-
squeeze(A; dims=throw(ArgumentError("the dimensions to squeeze must be specified with a `dims` keyword argument"))) = _squeeze(A, dims)
67+
squeeze(A; dims) = _squeeze(A, dims)
6868
function _squeeze(A::AbstractArray, dims::Dims)
6969
for i in 1:length(dims)
7070
1 <= dims[i] <= ndims(A) || throw(ArgumentError("squeezed dims must be in range 1:ndims(A)"))

0 commit comments

Comments
 (0)