Skip to content

Commit 02373a6

Browse files
committed
avoid useless call to groebner_basis
1 parent 5bc3cb4 commit 02373a6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/algorithms/dimension.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,9 @@ julia> dimension(I)
1919
"""
2020
function dimension(I::Ideal{T}) where T <: MPolyRingElem
2121

22-
gb = get(I.gb, 0, groebner_basis(I, complete_reduction = true))
22+
gb = get!(I.gb, 0) do
23+
groebner_basis(I, complete_reduction = true)
24+
end
2325
R = parent(first(gb))
2426

2527
res = Set([trues(ngens(R))])

0 commit comments

Comments
 (0)