Skip to content

Commit

Permalink
Use the official required kwarg form
Browse files Browse the repository at this point in the history
I forgot this existed
  • Loading branch information
mbauman committed Mar 29, 2018
1 parent 73933f5 commit d5f62c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion base/abstractarraymath.jl
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ julia> squeeze(a; dims=3)
2 4
```
"""
squeeze(A; dims=throw(ArgumentError("the dimensions to squeeze must be specified with a `dims` keyword argument"))) = _squeeze(A, dims)
squeeze(A; dims) = _squeeze(A, dims)
function _squeeze(A::AbstractArray, dims::Dims)
for i in 1:length(dims)
1 <= dims[i] <= ndims(A) || throw(ArgumentError("squeezed dims must be in range 1:ndims(A)"))
Expand Down

0 comments on commit d5f62c9

Please sign in to comment.