Skip to content

Commit

Permalink
[ToricSchemes] Fix underlying_divisor for trivial toric divisor (osca…
Browse files Browse the repository at this point in the history
  • Loading branch information
HereAround authored Jul 24, 2024
1 parent ed7e3bb commit ed82b76
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion experimental/Schemes/src/ToricDivisors/attributes.jl
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ end
function underlying_divisor(td::ToricDivisor; check::Bool=false, algorithm::Symbol=:direct)
return get_attribute!(td, :underlying_divisor) do
X = scheme(td)
@assert !iszero(coefficients(td)) "divisor must be non-trivial"
iszero(coefficients(td)) && return WeilDivisor(X, ZZ)
if algorithm == :direct
a = coefficients(td)::Vector{ZZRingElem}
pos = [(c > 0 ? c : zero(ZZ)) for c in a]
Expand Down

0 comments on commit ed82b76

Please sign in to comment.