diff --git a/src/Combinatorics/Matroids/matroids.jl b/src/Combinatorics/Matroids/matroids.jl index 43865ef13df7..9896006f7dbc 100644 --- a/src/Combinatorics/Matroids/matroids.jl +++ b/src/Combinatorics/Matroids/matroids.jl @@ -865,6 +865,6 @@ Group([ (3,4), (1,2), (2,3) ]) ``` """ function automorphism_group(m::Matroid) - length(m) > 0 || throw(ArgumentError("The matroid should not be empty.")) + @req length(m) > 0 "The matroid should not be empty." rank(m) < 1 ? automorphism_group(dual_matroid(m)) : automorphism_group(IncidenceMatrix(bases(m));action=:on_cols) end